• 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
Open Recent getting to work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Open Recent getting to work


  • Subject: Open Recent getting to work
  • From: "Wesley Smith" <email@hidden>
  • Date: Sat, 22 Dec 2007 10:46:55 -0800

I've been reading up on different threads for how to get Open Recent
to work, but I'm still not getting it to work in my App.  From what
I've found on the internets, I have put together the following
notification method for my NSApplication:

- (void)applicationWillFinishLaunching:(NSNotification *)aNotification
{
	NSMenu *main_menu = [NSApp mainMenu];
	id file_menu = [[main_menu itemWithTitle: @"File"] submenu];
	id open_rect_menu = [[file_menu itemWithTitle: @"Open Recent"] submenu];
	[open_rect_menu performSelector:@selector(_setMenuName:)
withObject:@"NSRecentDocumentsMenu"];
}

supposedly this last line should do the trick, but it doesn't seem to
do anything.  I have a nib file which I setup in interface builder to
trigger a function in a custom NSResponder when File > Open is
selected.  Somehow I'd like the results of this operation to populate
the Open Recent menu if a file is actually opened, but I am a bit lost
in the intricacies of how this should happen.  Any ideas?

thanks,
wes
_______________________________________________

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: Open Recent getting to work
      • From: "Wesley Smith" <email@hidden>
  • Prev by Date: How to tab between textfields in a collection view?
  • Next by Date: Re: Open Recent getting to work
  • Previous by thread: How to tab between textfields in a collection view?
  • Next by thread: Re: Open Recent getting to work
  • Index(es):
    • Date
    • Thread