This has been, or is being updated. The suggested pattern is now
- (id)init { self = [super init]; if (self) { } return self; } All our documentation has been updated to reflect this (even if it hasn’t necessarily made it out to the users yet) On May 8, 2010, at 11:27 AM, jeremy wrote: > On May 7, 2010, at 2:34 PM, Patrick M. Rutkowski wrote: > >> it worth checking for nil after doing self = [super init]? > > > Yes. It's part of a design pattern, which looks like this: > > --- > - (id)init > { > if (self = [super init]) > { > > } > return self; > } > --- > > See "Constraints and Conventions". > http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocAllocInit.html#//apple_ref/doc/uid/TP30001163-CH22-SW14 > > Also see "Handling Initialization Failure". > http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocAllocInit.html#//apple_ref/doc/uid/TP30001163-CH22-SW13 _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com