Re: What classes have -init?
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