I have the need to modify a menu item title, so I:

a) Added a tag to the menu item in IB (selected the menu item, then went to the first "tab" of the Inspector, and added a number in the "Tag" field. I tried both 99 and 1).
b) Added this code to my function:

   NSMenu *mainMenu = [NSApp mainMenu];
   NSMenuItem *menuItemToModify = [mainMenu itemWithTag: 99];

The problem is that mainMenu is never nil, menuItemToModify always is. I tried setting the "Tag" field for some standard menu items and it still returns nil.

This seems like really super basic behaviour that should be a snap to implement, so I'm guessing that I'm missing something really obvious.

Thanks for pointing out what I'm missing here!


dale

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to