• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: alternate pattern for object initializers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: alternate pattern for object initializers
      • From: Stuart Malin <email@hidden>
References: 
 >alternate pattern for object initializers (From: Stuart Malin <email@hidden>)

  • Prev by Date: Re: Cocoa UI In Carbon App Issues.
  • Next by Date: Re: Cocoa UI In Carbon App Issues.
  • Previous by thread: alternate pattern for object initializers
  • Next by thread: Re: alternate pattern for object initializers
  • Index(es):
    • Date
    • Thread