• 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: When is the 'Open Recent' submenu populated?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When is the 'Open Recent' submenu populated?


  • Subject: Re: When is the 'Open Recent' submenu populated?
  • From: "John C. Randolph" <email@hidden>
  • Date: Wed, 16 Mar 2005 11:50:13 -0800


On Mar 16, 2005, at 10:11 AM, Hamish Allan wrote:

Hi,

I'm looking to write code to assign key equivalents to items in 'Open Recent' in a document-based app (e.g., Cmd-1 for most recent, Cmd-2 for secondmost, etc.). However, apparently this submenu isn't yet populated when applicationDidFinishLaunching: is called. Can anybody suggest a better delegate method to use?

I would try something like this in your delegate: - (void)applicationDidFinishLaunching:(NSNotification *)aNotification

{

[self performSelector:@selector(checkRecentsMenu) withObject:nil afterDelay:0];

}

-  (void) checkRecentsMenu
{
// see if the menu has been populated when you get here...
}

This way, the app has not only been launched, it's also been through the event loop once when you get to the -checkRecentsMenu method.

HTH,

-jcr


John C. Randolph <email@hidden> (408) 974-8819 Sr. Cocoa Software Engineer, Apple Worldwide Developer Relations http://developer.apple.com/cocoa/index.html



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: When is the 'Open Recent' submenu populated?
      • From: Hamish Allan <email@hidden>
References: 
 >When is the 'Open Recent' submenu populated? (From: Hamish Allan <email@hidden>)

  • Prev by Date: Re: Odd NSData initWithContentsOfURL: issue
  • Next by Date: Re: Wait for NSTask to finish
  • Previous by thread: When is the 'Open Recent' submenu populated?
  • Next by thread: Re: When is the 'Open Recent' submenu populated?
  • Index(es):
    • Date
    • Thread