Re: Two mnemonics in Cocoa
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.