• 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: File's Owner
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File's Owner


  • Subject: Re: File's Owner
  • From: "Clark S. Cox III" <email@hidden>
  • Date: Fri, 30 Nov 2001 16:49:28 -0500

On Friday, November 30, 2001, at 04:23 , Peter Sichel wrote:

At 12:30 PM -0800 11/30/01, John C. Randolph wrote:
On Friday, November 30, 2001, at 12:04 PM, email@hidden wrote:

In two cases I have not been able to figure out what "File's
Owner" does in the Interface Builder window.

The "File's Owner" is a stand-in for whatever object loads the
nib file. In the case of MainMenu.nib, this will typically be
the NSApplication instance.

-jcr

This seemingly undocumented detail becomes critical if you

It is documented, in IB's FAQ.

subclass NSWindowController to manage windows in separate
nib files.
You must make the "File's Owner" be the Window
controller by setting its custom class and connect your
window to it. Otherwise your NSWindowController subclass
will not connect properly to the window when the nib file
is loaded.

From the documentation for NSWindowController:

- (id)initWithWindowNibName:(NSString *)windowNibName
... Sets the owner of the nib file to the receiver ...

- (id)initWithWindowNibName:(NSString *)windowNibName owner:(id)owner
... The owner argument is the nib file's owner ...

Although it could be a bit more clear.

--
Clark S. Cox, III
email@hidden
http://www.whereismyhead.com/clark/


References: 
 >Re: File's Owner (From: Peter Sichel <email@hidden>)

  • Prev by Date: Re: File's Owner
  • Next by Date: Re: File's Owner
  • Previous by thread: Re: File's Owner
  • Next by thread: Re: File's Owner
  • Index(es):
    • Date
    • Thread