• 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: How is "Open Recent >" identified and populated?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How is "Open Recent >" identified and populated?
      • From: Jerry Krinock <email@hidden>
References: 
 >How is "Open Recent >" identified and populated? (From: Jerry Krinock <email@hidden>)
 >Re: How is "Open Recent >" identified and populated? (From: "I. Savant" <email@hidden>)
 >Re: How is "Open Recent >" identified and populated? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: How to keep the last tree item of NSOutlineView in the most bottom of a Sidebar?
  • Next by Date: Re: Normalize an NSAttributedString
  • Previous by thread: Re: How is "Open Recent >" identified and populated?
  • Next by thread: Re: How is "Open Recent >" identified and populated?
  • Index(es):
    • Date
    • Thread