Re: File's Owner
Re: File's Owner
- Subject: Re: File's Owner
- From: Mike Abdullah <email@hidden>
- Date: Tue, 27 May 2008 16:51:59 +0100
On 27 May 2008, at 15:06, Andy Lee wrote:
On May 27, 2008, at 9:52 AM, Kyle Sluder wrote:
On Tue, May 27, 2008 at 8:48 AM, Andy Lee <email@hidden> wrote:
I just noticed +loadNibNamed:owner: is actually in a category of
NSBundle
added by AppKit. So I'd amend the above as follows: -[NSObject
loadNibNamed:] would be added to NSObject by a category in AppKit,
and would
be documented on a page with a title like "Application Kit
Extensions".
Woah... so sending NSBundle a -loadNibNamed: message would make the
NSBundle the File's Owner of the NIB? Who would you send the message
to? This seems like a bad idea.
You would send the message to the object you want to be the File's
Owner.
Instead of:
BOOL didLoad = [NSBundle loadNibNamed:@"MyNib" owner:myObject];
...you would say:
BOOL didLoad = [myObject loadNibNamed:@"MyNib"];
...thus leaving out any mention of bundles as an implementation
detail. It would then be correct to say that the File's Owner would
be the object that loaded the nib.
And then how would you know where to find the nib in question? :)
--Andy
_______________________________________________
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
_______________________________________________
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