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 20:43:46 -0600
- Thread-topic: What classes have -init?
I have read it. My point was that if all Cocoa classes called "init"
somewhere in their other initializers (or had a two-step initialization
similar to what MacApp did), then you could simply override (not call)
"init" for simple ivar initialization in a subclass, which would in no way
interfere with a designated initializer. Since they don't all call it, it's
really academic.
On 2/11/10 6:52 PM, "email@hidden"
<email@hidden> wrote:
> Message: 2
> Date: Thu, 11 Feb 2010 12:18:55 -0800
> From: mmalc Crawford <email@hidden>
> Subject: Re: What classes have -init?
> To: Cocoa-Dev List <email@hidden>
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=us-ascii
>
>
> On Feb 11, 2010, at 12:08 pm, Gordon Apple wrote:
>
>> 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.
>>
> Please read "The Designated Initializer" in
> <http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Objecti
> veC/Articles/ocAllocInit.html>, in particular the section starting "Figure 3-3
> Covering the Designated Initializer".
>
> mmalc
_______________________________________________
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