• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: awakeFromNib and File's Owner
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: NSProgressIndicator, MUST use threads?
  • Next by Date: Location of font button images
  • Previous by thread: Re: awakeFromNib and File's Owner
  • Next by thread: How to Get XCode to Really Clean Up
  • Index(es):
    • Date
    • Thread