Skip navigation.
 
mlRe: Two mnemonics in Cocoa
FROM : Dustin Voss
DATE : Sat Nov 23 19:49:33 2002

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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlTwo mnemonics in Cocoa Chad Armstrong Nov 21, 08:48
mlRe: Two mnemonics in Cocoa Sam Griffith Nov 21, 09:34
mlRe: Two mnemonics in Cocoa j o a r Nov 21, 09:37
mlRe: Two mnemonics in Cocoa Ondra Cada Nov 21, 15:00
mlRe: Two mnemonics in Cocoa Dustin Voss Nov 23, 19:49