Re: init returns nil or raises exception?
Re: init returns nil or raises exception?
- Subject: Re: init returns nil or raises exception?
- From: Matt Neuburg <email@hidden>
- Date: Sat, 09 Oct 2010 11:05:38 -0700
- Thread-topic: init returns nil or raises exception?
On Fri, 8 Oct 2010 00:57:01 -0700, Kyle Sluder <email@hidden>
said:
>
>- (id)init {
> if (!(self = [super init]))
> return nil;
>
> // do other initialization
>
> return self;
>}
>
>To my brain, it might as well be required syntax.
Apple has signaled that the canonical form is now in fact:
- (id) init {
self = [super init];
if (self) {
// do other initialization
{
return self;
}
m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden