Open Recent getting to work
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