Skip navigation.
 
mlRe: Bypassing Interface Builder
FROM : Andy Lee
DATE : Thu May 15 03:02:26 2008

On May 14, 2008, at 8:45 PM, Graham Cox wrote:
> On 15 May 2008, at 10:15 am, Johnny Lundy 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?

>
> It depends. It's the file's (nib's) owner. If you are talking about 
> MainMenu.nib, its owner is the application instance. For typical 
> document nibs, it's the NSDocument instance. For others, it's 
> whatever you pass as "owner" in the NSBundle class method 
> +loadNibNamed:owner:


You may not be aware that you can create nibs that are *not* loaded at 
application launch, but only when you use +loadNibNamed:owner:.  For 
example, you might put resources for your application's About box in a 
separate nib that is only loaded when the user chooses "About..." from 
the menu.  This would speed up launch time slightly and would avoid 
allocating memory for the About box until absolutely necessary.

Note also that you can load a nib file multiple times, and each time a 
brand new set of objects will be instantiated and interconnected using 
the object descriptions in the nib file.  NSDocument-based 
applications use this fact when you create a new document.

--Andy

Related mailsAuthorDate
mlBypassing Interface Builder colo May 14, 16:36
mlRe: Bypassing Interface Builder I. Savant May 14, 17:11
mlRe: Bypassing Interface Builder colo May 14, 17:35
mlRe: Bypassing Interface Builder I. Savant May 14, 17:43
mlRe: Bypassing Interface Builder Andy Lee May 14, 17:50
mlRe: Bypassing Interface Builder colo May 14, 17:53
mlRe: Bypassing Interface Builder I. Savant May 14, 17:58
mlRe: Bypassing Interface Builder David Wilson May 14, 17:59
mlRe: Bypassing Interface Builder I. Savant May 14, 18:01
mlRe: Bypassing Interface Builder I. Savant May 14, 18:05
mlRe: Bypassing Interface Builder Gregory Weston May 14, 18:06
mlRe: Bypassing Interface Builder glenn andreas May 14, 18:13
mlRe: Bypassing Interface Builder Wayne Packard May 14, 18:26
mlRe: Bypassing Interface Builder Andy Lee May 14, 18:37
mlRe: Bypassing Interface Builder Stefan Werner May 14, 18:46
mlRe: Bypassing Interface Builder Bill Bumgarner May 14, 19:00
mlRe: Bypassing Interface Builder Boyd Collier May 14, 19:34
mlRe: Bypassing Interface Builder colo May 14, 19:37
mlRe: Bypassing Interface Builder Julius Guzy May 14, 22:05
mlRe: Bypassing Interface Builder Torsten Curdt May 14, 22:49
mlRe: Bypassing Interface Builder colo May 15, 00:53
mlRe: Bypassing Interface Builder Graham Cox May 15, 01:26
mlRe: Bypassing Interface Builder Graham Cox May 15, 01:41
mlRe: Bypassing Interface Builder colo May 15, 02:14
mlRe: Bypassing Interface Builder Johnny Lundy May 15, 02:15
mlRe: Bypassing Interface Builder Graham Cox May 15, 02:29
mlRe: Bypassing Interface Builder I. Savant May 15, 02:43
mlRe: Bypassing Interface Builder Graham Cox May 15, 02:45
mlRe: Bypassing Interface Builder I. Savant May 15, 02:51
mlRe: Bypassing Interface Builder I. Savant May 15, 02:54
mlRe: Bypassing Interface Builder Andy Lee May 15, 03:02
mlRe: Bypassing Interface Builder Graham Cox May 15, 03:02
mlRe: Bypassing Interface Builder Andy Lee May 15, 03:06
mlRe: Bypassing Interface Builder I. Savant May 15, 03:07
mlRe: Bypassing Interface Builder Andy Lee May 15, 03:08
mlRe: Bypassing Interface Builder I. Savant May 15, 03:09
mlRe: Bypassing Interface Builder I. Savant May 15, 03:15
mlRe: Bypassing Interface Builder Andy Lee May 15, 03:29
mlRe: Bypassing Interface Builder Julius Guzy May 15, 03:35
mlRe: Bypassing Interface Builder I. Savant May 15, 03:37
mlRe: Bypassing Interface Builder Johnny Lundy May 15, 04:33
mlRe: Bypassing Interface Builder Julius Guzy May 15, 04:36
mlRe: Bypassing Interface Builder Johnny Lundy May 15, 04:54
mlRe: Bypassing Interface Builder Graham Cox May 15, 05:43
mlRe: Bypassing Interface Builder Uli Kusterer May 15, 07:50
mlRe: Bypassing Interface Builder Uli Kusterer May 15, 07:55
mlRe: Bypassing Interface Builder Uli Kusterer May 15, 08:15
mlcocoa mentoring (was Re: Bypassing Interface Builder) Torsten Curdt May 15, 15:36
mlRe: cocoa mentoring (was Re: Bypassing Interface Builder) Paul Bruneau May 15, 15:47
mlRe: cocoa mentoring (was Re: Bypassing Interface Builder) Uli Kusterer May 15, 16:08
mlcocoaheads frankfurt (was Re: cocoa mentoring) Torsten Curdt May 15, 16:44
mlRe: cocoa mentoring (was Re: Bypassing Interface Builder) Torsten Curdt May 15, 16:51
mlRe: Bypassing Interface Builder Andy Lee May 15, 17:11
mlRe: Bypassing Interface Builder Johnny Lundy May 15, 18:40
mlRe: cocoa mentoring (was Re: Bypassing Interface Builder) Dennis Munsie May 15, 19:34
mlRe: Bypassing Interface Builder Paul Sargent May 15, 20:07
mlRe: Bypassing Interface Builder Uli Kusterer May 15, 20:48
mlRe: Bypassing Interface Builder Shawn Erickson May 15, 22:20
mlRe: Bypassing Interface Builder Shawn Erickson May 15, 22:30
mlRe: Bypassing Interface Builder Johnny Lundy May 15, 22:32
mlRe: cocoa mentoring (was Re: Bypassing Interface Builder) Torsten Curdt May 15, 23:03