On 2009 Aug 25, at 08:38, I. Savant wrote:

On Aug 25, 2009, at 11:33 AM, Jerry Krinock wrote:

Is there some magic under the covers? How does Cocoa know which menu item is "Open Recent"?

 What about its title? :-)

No, that can't be, because a title has to be localized. Actually, instead of using separate nibs, I use one nib and localize programatically. The title of my "Open Recent" menu item is "openRecent" in Interface Builder, then it gets changed during - applicationDidFinishLaunching to "Open Recent". But if I used separate nibs like most people do, it could be in a different language.

It's possible it looks for it by name (and also possible it only cares about the first one it finds). In what order was your copied one? First or second?

My copy was second, and both the original and the copy got the "Open Recent" treatment.

Can anyone explain the mystery, or is it indeed "magic" under the covers?
_______________________________________________

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 arch...@mail-archive.com

Reply via email to