Re: awakeFromNib multiple objects - all connected?
Re: awakeFromNib multiple objects - all connected?
- Subject: Re: awakeFromNib multiple objects - all connected?
- From: Kyle Sluder <email@hidden>
- Date: Sat, 05 Jul 2014 21:52:44 -0500
On Sat, Jul 5, 2014, at 08:10 PM, Rob Petrovec wrote:
>
> > On Jul 4, 2014, at 9:13 PM, Graham Cox <email@hidden> wrote:
> >
> >
> > On 5 Jul 2014, at 1:56 pm, Trygve Inda <email@hidden> wrote:
> >
> >> As long as A can call into B & C and know that B & C have their outlets
> >> hooked up, that's fine.
> >
> > You can rely on all outlets being connected. What you can't rely on is the order in which each object's -awakeFromNib is called.
> Actually, you can’t rely on all the outlets in the entire nib to be connected when the first awakeFromNib is called. This is an undocumented behavior, so it can change out from under you at any time. So you shouldn’t rely on this behavior just because it happens today, it could easily change in the some future release.
The resource programming guide explicitly describes the sending of
-awakeFromNib as occurring after all outlets have been set up:
<https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html#//apple_ref/doc/uid/10000051i-CH4-SW18>
--Kyle Sluder
_______________________________________________
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