Re: alternate pattern for object initializers
Re: alternate pattern for object initializers
- Subject: Re: alternate pattern for object initializers
- From: "Kyle Sluder" <email@hidden>
- Date: Mon, 26 May 2008 02:51:51 -0400
On Mon, May 26, 2008 at 1:47 AM, Stuart Malin <email@hidden> wrote:
> As I said, my pattern is just a convenience:
Actually, it's not. You've just made -init the designated
initializer. Therefore if -init does not result in a valid state for
your object, you have a bug on your hands.
And for future reference, make sure that you test for self != nil in
your initializers. Otherwise you could get a crash earlier than would
be useful.
--Kyle Sluder
_______________________________________________
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