On Jan 19, 2009, at 11:04 PM, Michael Ash wrote:
I maintain that NSObject -init is guaranteed to do nothing, and changing this fact would seriously break the API contract.
I read it that it does nothing to initialize the object (since the object has nothing that needs to be initialized). That doesn't preclude that it may not do something debugging related book keeping, for example.
But even if it does nothing what so ever, you still can't skip calling it. The documentation is quite clear that you need to do [super init] (or another init method) regardless:
"Subclass versions of init need to incorporate the initialization code for the classes they inherit from, through a message to super"
So even though it is contracted to do nothing, subclass inits are contracted that they need to call super.
Glenn Andreas gandr...@gandreas.com <http://www.gandreas.com/> wicked fun! Mad, Bad, and Dangerous to Know _______________________________________________ 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