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: Joel Norvell <email@hidden>
- Date: Sun, 25 Mar 2012 11:10:06 -0700 (PDT)
Hi Fritz,
Thank you very much for answering my question!
Sincerely,
Joel
________________________________
From: Fritz Anderson <email@hidden>
To: Joel Norvell <email@hidden>
Cc: "email@hidden" <email@hidden>
Sent: Sunday, March 25, 2012 11:02 AM
Subject: Re: Is it valid to override awakeFromNib in my NSApplicationDelegate?
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