Re: File's Owner
Re: File's Owner
- Subject: Re: File's Owner
- From: "Sherm Pendley" <email@hidden>
- Date: Sat, 24 May 2008 07:02:15 -0400
On Sat, May 24, 2008 at 6:49 AM, Paul Sargent <email@hidden> wrote:
>
> On 24 May 2008, at 05:39, Andreas Mayer wrote:
>
>>
>> I thought, maybe a picture would help:
>>
>> http://www.harmless.de/images/other/files_owner.png
>>
>
> Exactly the picture I was about to draw.
>
> Johnny Lundy wrote:
>
>> Saying it connects the nib to an object outside the nib sounds good, but
>> what object is that?
>>
>
> The object that loaded the NIB. What object is that? Whichever is passed
> when the NIB is loaded with [NSBundle loadNibNamed:owner:]
>
> e.g. NSApplication probably has code that looks like
>
> [NSBundle loadNibNamed:@"MainMenu" owner:self]
>
> You might have a piece of code that reads
>
> [NSBundle loadNibNamed:@"InspectorWindows" owner:inspectorController]
If your inspectorController is your own custom subclass of
NSWindowController, it will make itself the nib's owner if you create it
like this:
MyInspectorController* ic = [[MyInspectorController alloc] initWithNibName:@
"inspectorWindows"];
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden