• 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
problem with menuitem's keyEquivalent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: problem with menuitem's keyEquivalent
      • From: j o a r <email@hidden>
  • Prev by Date: Programatically setting LSUIElement
  • Next by Date: AirPort Net Detection and Mon Power off
  • Previous by thread: Re: Programatically setting LSUIElement
  • Next by thread: Re: problem with menuitem's keyEquivalent
  • Index(es):
    • Date
    • Thread