• 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: Changing Menu item under application menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing Menu item under application menu


  • Subject: Re: Changing Menu item under application menu
  • From: Rob Keniger <email@hidden>
  • Date: Fri, 5 Jun 2009 18:55:51 +1000


On 05/06/2009, at 6:46 PM, Nikhil Khandelwal wrote:

I want to change the name of application in the main menu programmatically.
Using the following line of code I am able to get reference to other menu items like File, Insert, draw etc but not getting reference to application menu.


[[NSApp mainMenu] itemWithTitle:@"File"];

By name of application I means the first menu item shown in every application.


[[NSApp mainMenu] itemAtIndex:0]

In general it's best to avoid using -itemWithTitle: as localization may change the title.

--
Rob Keniger



_______________________________________________

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: Changing Menu item under application menu
      • From: Nikhil Khandelwal <email@hidden>
References: 
 >Changing Menu item under application menu (From: Nikhil Khandelwal <email@hidden>)

  • Prev by Date: Changing Menu item under application menu
  • Next by Date: finding bundle identifiers
  • Previous by thread: Changing Menu item under application menu
  • Next by thread: RE: Changing Menu item under application menu
  • Index(es):
    • Date
    • Thread