Re: Open Recent Menu
Re: Open Recent Menu
- Subject: Re: Open Recent Menu
- From: Jeff Johnson <email@hidden>
- Date: Tue, 14 Aug 2007 21:12:12 -0500
On Aug 14, 2007, at 8:31 PM, Jeff Bland wrote:
On 8/14/07, Jeff Johnson <email@hidden> wrote:
I'm not from Apple, but here's how it works:
http://lapcatsoftware.com/blog/2007/07/10/working-without-a-nib-
part-5-open-recent-menu/
Thanks, your articles on nibless cocoa are full of useful information.
For some reason your solution of calling _setMenuName: isn't
working in my app..
temp = [file addItemWithTitle:@"Open Recent" action:nil
keyEquivalent:@""];
NSMenu *recent_menu = [[NSMenu alloc] initWithTitle:@"Open
Recent"];
[recent_menu performSelector:@selector(_setMenuName:)
withObject:@"NSRecentDocumentsMenu"];
[temp setSubmenu:recent_menu];
temp = [recent_menu addItemWithTitle:NSLocalizedString(@"Clear
Menu", nil) action:@selector(clearRecentDocuments:)
keyEquivalent:@""];
Your downloadable nibless project does work however so I'll try to
investigate.
Glad to help another Jeff, Jeff!
When are you adding your menu? If it's any later than
applicationWillFinishLaunching:, it may be too late.
-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