• 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
Re: Two mnemonics in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two mnemonics in Cocoa


  • Subject: Re: Two mnemonics in Cocoa
  • From: Dustin Voss <email@hidden>
  • Date: Sat, 23 Nov 2002 10:49:33 -0800

On Thursday, November 21, 2002, at 06:00 AM, Ondra Cada wrote:

On Thursday, Nov 21, 2002, at 08:48 Europe/Prague, Chad Armstrong wrote:

Is it possible to assign two mnemonics or key combinations to one command?

Definitely the simplest would be using two menu items with the same target/action. Also, it would have another advantage of advertising the behaviour clearly to the user.

You can make two menu items with different mnemonics but the same target/action, but then use Carbon functions to hide one of them while still leaving its mnemonic active.

See "http://cocoadev.com/index.pl?NSMenu"; for how to get a Carbon reference to a Cocoa menu item, and <Menu.h> for the appropriate hiding functions. I think there are two such functions, one that deactivates the mnemonic, and one that doesn't.
_______________________________________________
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.
References: 
 >Re: Two mnemonics in Cocoa (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: An interesting localisation issue
  • Next by Date: Re: Editing a record in a custom view
  • Previous by thread: Re: Two mnemonics in Cocoa
  • Next by thread: mouseEntered event in NSWindow subclass
  • Index(es):
    • Date
    • Thread