• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bug in setKeyEquivalentMask:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in setKeyEquivalentMask:?


  • Subject: Bug in setKeyEquivalentMask:?
  • From: "Bell, Carl" <email@hidden>
  • Date: Tue, 6 Nov 2001 09:31:12 -0600
  • Thread-topic: Bug in setKeyEquivalentMask:?

Howdy,

I am trying to modify the key equivalents (actually, the modifier keys)
for two menus at runtime. Depending on a user setting, I want to be
able to use cmd-N and shift-cmd-N to create new default and secondary
document types. I'm using

[aMenuItem setKeyEquivalentMask:NSCommandKeyMask]

to set it to cmd-N and

[aMenuItem setKeyEquivalentMask:(NSCommandKeyMask|NSShiftKeyMask)]

to set it to shift-cmd-N.

One thing I've noticed is that if the shift key modifier is set for a
menu in IB, it "sticks" and the first line above doesn't set it to just
cmd. If I don't specify the shift key in IB, i.e., set both menu items
to cmd-N, it works just fine. Also, when I tried other modifier keys,
it worked. It seems that it's just the shift key.

Am I doing this right, or is the shift key special, or is this a bug? To
work around this I can just set both menus to cmd-N in IB.

-cb

________________________________________________________________________
Carl W. Bell <http://www.baylor.edu/~Carl_Bell/index.html>
Sr. Analyst/Programmer Baylor University Academic Technology Center


  • Prev by Date: Re: Info window scenario
  • Next by Date: connecting objects from different NIB files?
  • Previous by thread: Re: Newbie, Q about files
  • Next by thread: Re: Bug in setKeyEquivalentMask:?
  • Index(es):
    • Date
    • Thread