Re: debugging hard-to-locate error in NSApplication delegate
Re: debugging hard-to-locate error in NSApplication delegate
- Subject: Re: debugging hard-to-locate error in NSApplication delegate
- From: "Michael Ash" <email@hidden>
- Date: Mon, 12 Jan 2009 20:06:24 -0500
On Mon, Jan 12, 2009 at 1:41 PM, Quincey Morris
<email@hidden> wrote:
> This isn't going to work because your app delegate object is in your NIB
> file and is (re)created at startup by unarchiving. Therefore,
> 'initWithCoder' will be called instead or 'init'.
Well actually no, the true picture is considerably more complex than
that, and -init is correct.
NSWindows get the full NSWindow initializer.
Plain old NSViews (which are then often customized to a different
subclass in the inspector) get -initWithFrame:.
Other top-level nib objects get plain old -init.
And everything else (pre-made views and controls off the palette) gets
-initWithCoder:.
I *think* that's the full list of what gets initialized how, but I may
have missed a spot.
Mike
_______________________________________________
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