• 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: "Hamish Allan" <email@hidden>
  • Date: Mon, 26 May 2008 10:01:09 +0100

On Mon, May 26, 2008 at 8:25 AM, Stuart Malin <email@hidden> wrote:

> I guess I have. So, would a reasonable definition for  "designated"
> initializer be: it is the initializer that calls the superclass's
> initializer?

I would define it as: the initializer that is guaranteed to be called
(directly or indirectly) by all other initializers. The purpose of
this is so that if a subclass needs to perform extra initialization,
it need only override the designated initializer to ensure that this
initialization is performed regardless of which initializer may be
called when the subclass is used.

But yes, because all other initializers end up calling it, it should
be the only initializer that calls the superclass's initializer.

Hamish
_______________________________________________

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

References: 
 >alternate pattern for object initializers (From: Stuart Malin <email@hidden>)
 >Re: alternate pattern for object initializers (From: "Kyle Sluder" <email@hidden>)
 >Re: alternate pattern for object initializers (From: Stuart Malin <email@hidden>)

  • Prev by Date: Re: File's Owner
  • Next by Date: Re: How hard is it to learn Cocoa - Survey ?
  • Previous by thread: Re: alternate pattern for object initializers
  • Next by thread: Re: alternate pattern for object initializers
  • Index(es):
    • Date
    • Thread