Such a newbie question that I'm embarrassed to ask it :-)
Such a newbie question that I'm embarrassed to ask it :-)
- Subject: Such a newbie question that I'm embarrassed to ask it :-)
- From: Dale Jensen <email@hidden>
- Date: Thu, 10 Jul 2008 21:36:59 -0500
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 (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