• 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: Andy Lee <email@hidden>
  • Date: Tue, 27 May 2008 10:06:12 -0400

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.

--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


  • Follow-Ups:
    • Re: File's Owner
      • From: Mike Abdullah <email@hidden>
References: 
 >File's Owner (From: Johnny Lundy <email@hidden>)
 >Re: File's Owner (From: Uli Kusterer <email@hidden>)
 >Re: File's Owner (From: Quincey Morris <email@hidden>)
 >Re: File's Owner (From: dream cat7 <email@hidden>)
 >Re: File's Owner (From: "Hamish Allan" <email@hidden>)
 >Re: File's Owner (From: Andy Lee <email@hidden>)
 >Re: File's Owner (From: Andy Lee <email@hidden>)
 >Re: File's Owner (From: "Kyle Sluder" <email@hidden>)

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