• 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: Open Recent Menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Open Recent Menu
      • From: "Jeff Bland" <email@hidden>
References: 
 >Re: Open Recent Menu (From: "ronald b. kopelman" <email@hidden>)
 >Re: Open Recent Menu (From: "Jeff Bland" <email@hidden>)
 >Re: Open Recent Menu (From: PGM <email@hidden>)
 >Re: Open Recent Menu (From: "Jeff Bland" <email@hidden>)
 >Re: Open Recent Menu (From: Jeff Johnson <email@hidden>)
 >Re: Open Recent Menu (From: "Jeff Bland" <email@hidden>)

  • Prev by Date: Re: Open Recent Menu
  • Next by Date: Re: Cocoa-dev Digest, Vol 4, Issue 795
  • Previous by thread: Re: Open Recent Menu
  • Next by thread: Re: Open Recent Menu
  • Index(es):
    • Date
    • Thread