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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to