duplicate menu items created?
duplicate menu items created?
- Subject: duplicate menu items created?
- From: Gary Yuen <email@hidden>
- Date: Wed, 15 Feb 2006 11:46:56 -0800
Hi,
I'm creating an InputManager for Safari. I have the guts of what I
want done. Now I'm just creating a menu item for it to toggle it's
state. With the following code, I get two menu items.
NSMenuItem* menuItem;
menuItem = [[NSMenuItem alloc] initWithTitle:@"...."
action:@selector (toggleEnabled:) keyEquivalent:@"g"];
[menuItem setKeyEquivalentModifierMask:NSAlternateKeyMask |
NSCommandKeyMask];
root_ = menuItem;
[menuItem setState: NSOnState];
[menuItem setToolTip:@"....."];
NSMenu* applicationMenu = [[[[NSApplication sharedApplication]
mainMenu] itemAtIndex: 0] submenu];
[applicationMenu insertItem:menuItem atIndex:5];
[menuItem release];
Though nly one of the menu items has the keyEquivalent set. Any
ideas? :)
Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden