FROM : Andy Lee
DATE : Thu May 15 03:06:06 2008
On May 14, 2008, at 8:51 PM, I. Savant wrote:
>> Also, the documentation only says about File's Owner that it is the
>> object that loaded the nib file. What is that object, if my nib
>> file just gets loaded at application launch?
>
> Your app's NSApplication instance. This is in the documentation.
It can be a little tricky to find, though. I found it in the first
hit from Googling "cocoa file's owner":
<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CoreAppArchitecture/chapter_7_section_8.html
>
"Each Cocoa application has a main nib file that contains the
application-specific menus and possibly one or more windows. NSApp is
File's Owner of the main nib file. When an application launches, NSApp
loads the main nib file, unarchiving it, and displays the menus and
initial windows. Many applications have auxiliary nib files for such
things as documents and panels; these nib files are loaded on demand
(that is, when the user requests behavior provided by objects in the
nib file)."
--Andy
DATE : Thu May 15 03:06:06 2008
On May 14, 2008, at 8:51 PM, I. Savant wrote:
>> Also, the documentation only says about File's Owner that it is the
>> object that loaded the nib file. What is that object, if my nib
>> file just gets loaded at application launch?
>
> Your app's NSApplication instance. This is in the documentation.
It can be a little tricky to find, though. I found it in the first
hit from Googling "cocoa file's owner":
<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CoreAppArchitecture/chapter_7_section_8.html
>
"Each Cocoa application has a main nib file that contains the
application-specific menus and possibly one or more windows. NSApp is
File's Owner of the main nib file. When an application launches, NSApp
loads the main nib file, unarchiving it, and displays the menus and
initial windows. Many applications have auxiliary nib files for such
things as documents and panels; these nib files are loaded on demand
(that is, when the user requests behavior provided by objects in the
nib file)."
--Andy






Cocoa mail archive

