problem with menuitem's keyEquivalent
problem with menuitem's keyEquivalent
- Subject: problem with menuitem's keyEquivalent
- From: Michael Schmidt <email@hidden>
- Date: Thu, 2 Oct 2003 10:41:21 +0200
- Organization: AbsInt GmbH
Hi,
I'm trying to move the keyEquivalent from one menuitem to another by calling
menuitem's setKeyEquivalent and setKeyEquivalentModifierMask. The problem,
that arises is, that after the switch the menu shows both items with the attached
key-equivalent. In the example menuitem_1 has a keyEquivalet of CMD-N, menuitem_2
has none at all.
// action activated by a button in preferences
[menuitem_1 setKeyEquivalentModifierMask:0]
[menuitem_1 setKeyEquivalent:@""]
[menuitem_2 setKeyEquivalentModifierMask:NSCommandMask]
[menuitem_2 setKeyEquivalent:@"n"]
Before this block of code the menu looks like this (* denotes CMD):
Item1 *N
Item2
and after it:
Item1 N
Item2 *N
Any ideas, what goes wrong?
--
Michael Schmidt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.