• 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 14:50:05 -0400

On May 27, 2008, at 2:02 PM, Quincey Morris wrote:
So I was wondering if something like "Nib's Root Object" might work better. I think, to anyone with even a small amount of exposure to programming topics, "root" connotes something structural and not something behavioral, which seems appropriate here.

That's not good either. "Root object" has a special meaning in the context of archiving graphs of objects. In particular, it's one of the archived objects, whereas File's Owner is by definition not one of the objects in the nib.


On May 27, 2008, at 07:06, Andy Lee wrote:

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.

Aside from functional issues, I'm not sure this helps greatly on the conceptual front. It may just shift the question from "Which object do I specify for 'owner:'?" to "Which object do I send the message to?" I guess you'd have to test it in the field to find out. :)

I was addressing specifically the point you made, which was that "File's Owner isn't the object that loaded the nib, it's the object that the object that loaded the nib *says* is the owner." My way, this level of indirection goes away.


If you look at the rest of my original suggestion (before the clarification above), I suggested the term "Nib's Loader" as a replacement for "File's Owner", which would connote something behavioral: "I'm the object that loaded this nib."

I think "Nib's Loader" would have decreased cognitive load if it had been the term used in the first place (along with the -loadNibNamed: change). I wrote:

This way we'd be reinforcing the concept of "load a nib" in two places, rather than "load a nib" in one place and "own a file" in the other.


I personally think this would help, mainly if we could go back in time to make the change ;). But maybe it wouldn't.

--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: Quincey Morris <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: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Distributed Objects/NSConnection dying under 10.4
  • Next by Date: Re: running an external app
  • Previous by thread: Re: File's Owner
  • Next by thread: Re: File's Owner
  • Index(es):
    • Date
    • Thread