-[NSMenuItem setKeyEquivalent] not working for some keys
-[NSMenuItem setKeyEquivalent] not working for some keys
- Subject: -[NSMenuItem setKeyEquivalent] not working for some keys
- From: Ken Victor <email@hidden>
- Date: Wed, 18 Oct 2006 13:22:30 -0700
the app i'm developing lets users specify the keyboard shortcuts to
use for menu items. this has been working for several months now.
however, i noticed yesterday that if i attempt to set a shortcut (via
-[NSMenuItem setKeyEquivalent]) of command-1 / command-2 / command-3
/ command-4 it no longer "takes".
while debugging, i've discovered the following: if i examine the menu
item before and after calling setKeyEquivalent, i see the private
iVar _keyEquivalent changing properly. however if i "po [menuItem
keyEquivalent]" from the debugger console window the debugger prints
out <object returned empty description> and the menu does not show
the shortcut as being set. (note that i do also use
setKeyEquivalentModifierMask to set the appropriate mask.)
i can set shortcuts to other command-<X> (where X is anything but 1,
2, 3, or 5) and if i set a shortcut to use modifier keys other than
or in conjunction with the command key it also works. additonally, if
i set menu item shortcuts in IB, it works fine for command 1-4/
now i know (after many frustrating hours of various debugging and
testing) that this has something to do with my user account, because
if i login as a different user or boot from a different partition,
the problem goes away. i also know that this is not related to any of
my login startup items (as set in system prefs for my account)
because if i remove all of them the problem persists.
has anyone encountered anything like this before?
can anyone suggest how i can find this problem? or point me to some
documentation as to how to find the problem?
thanx very much,
ken
_______________________________________________
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