Re: Open Recent Menu
Re: Open Recent Menu
- Subject: Re: Open Recent Menu
- From: "Jeff Bland" <email@hidden>
- Date: Tue, 14 Aug 2007 19:31:42 -0600
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.
_______________________________________________
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