• 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: What classes have -init?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What classes have -init?


  • Subject: Re: What classes have -init?
  • From: Gordon Apple <email@hidden>
  • Date: Thu, 11 Feb 2010 14:08:30 -0600
  • Thread-topic: What classes have -init?

My point was that if you could count on "init" being called internally and
all you needed was to initialize some ivars, you could override "init" and
not have to override the (sometimes more involved) designated initializer
and possibly other initializers.  You could still use the (superclass)
designated initializer or a class-level instantiator without overriding it.

This relates to a long ago discussion about the fact that class-level
instantiators, e.g., [someClass  someClassWithMoreStuff], should (and I
think do) always use the class designation "self" so that they always
instantiated the subclass object and not the superclass object.


On 2/11/10 12:59 PM, "Scott Ribe" <email@hidden> wrote:

>> ...but it still would have been useful, sometimes
>> eliminating the need to override multiple initializers.
>
> Are you missing the point of the designated initializer? Or have you dealt
> with classes that did not have one, or did not use it properly?



_______________________________________________

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: What classes have -init?
      • From: mmalc Crawford <email@hidden>
References: 
 >Re: What classes have -init? (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: What classes have -init?
  • Next by Date: Re: What classes have -init?
  • Previous by thread: Re: What classes have -init?
  • Next by thread: Re: What classes have -init?
  • Index(es):
    • Date
    • Thread