Re: awakeFromNib and File's Owner
Re: awakeFromNib and File's Owner
- Subject: Re: awakeFromNib and File's Owner
- From: "Erik M. Buck" <email@hidden>
- Date: Mon, 13 Dec 2004 21:23:35 -0500
I think a reasonable supposition of Apple's rational is provided in the
archives at
http://www.cocoabuilder.com/archive/message/cocoa/2004/2/14/97069. The
article quotes Apple's own documentation which gives an example of why it is
helpful for the file's owner's awakeFromNib to be called.
Also, to plug "Cocoa Programming" gratuitously as another reference to the
existing behavior:
>From "Cocoa Programming" page 212:
The owner argument to –loadNibNamed:owner: is the object that is used as the
file’s
owner for the nib. Any connections made to the file’s owner within the .nib
are
made to the owner, specified when the .nib is loaded. Connections that
cannot be
made because of inconsistencies between the owner used when the .nib is
loaded
and the outlets and actions specified for the file’s owner when the .nib was
created
are discarded. The –awakeFromNib method is also sent to the file’s owner
specified
with –loadNibNamed:owner:. The file’s owner is not technically part of the
.nib, but a
.nib’s owner can implement –awakeFromNib to perform any logic needed after a
nib
has been loaded. If several .nibs are loaded using the same owner, that
owner’s
–awakeFromNib method is called multiple times.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden