Re: Is it valid to override awakeFromNib in my NSApplicationDelegate?
Re: Is it valid to override awakeFromNib in my NSApplicationDelegate?
- Subject: Re: Is it valid to override awakeFromNib in my NSApplicationDelegate?
- From: Fritz Anderson <email@hidden>
- Date: Sun, 25 Mar 2012 13:02:32 -0500
On 25 Mar 2012, at 12:49 PM, Joel Norvell wrote:
> I noticed that NSApplicationDelegate instances get awakeFromNib messages.
>
> I've tried to find its definition. But I haven't been able to find it.
>
> Is it be valid to override awakeFromNib in NSApplicationDelegate?
It is documented that any object in the NIB, and File's Owner, are sent -awakeFromNib when the NIB has fully loaded. See the reference document for the <NSNibAwaking> protocol.
The order of -awakeFromNib calls is not guaranteed, only that all the connections specified in the NIB itself will have been made. The Resource Programming Guide, in the chapter "Nib Files" (strangely available in the iOS library only), it says, "In OS X, Cocoa tries to call the awakeFromNib method of File’s Owner last but does not guarantee that behavior."
— F
_______________________________________________
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