Re: How is "Open Recent >" identified and populated?
Re: How is "Open Recent >" identified and populated?
- Subject: Re: How is "Open Recent >" identified and populated?
- From: Jeff Johnson <email@hidden>
- Date: Tue, 25 Aug 2009 18:43:44 -0500
On Aug 25, 2009, at 6:23 PM, Jerry Krinock wrote:
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?
Hi Jerry.
I discuss the magic a bit in a blog post:
http://lapcatsoftware.com/blog/2007/07/10/working-without-a-nib-part-5-open-recent-menu/
-Jeff
_______________________________________________
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