Thanks Rob. Its working --Nikhil
-----Original Message----- From: cocoa-dev-bounces+nikhil_khandelwal=persistent.co...@lists.apple.com [mailto:cocoa-dev-bounces+nikhil_khandelwal=persistent.co...@lists.apple.com] On Behalf Of Rob Keniger Sent: Friday, June 05, 2009 2:26 PM To: Cocoa Dev Subject: Re: Changing Menu item under application menu 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/nikhil_khandelwal%40persistent.co.in This email sent to nikhil_khandel...@persistent.co.in DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com