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.
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 mails | Author | Date |
|---|---|---|
| Chad Armstrong | Nov 21, 08:48 | |
| Sam Griffith | Nov 21, 09:34 | |
| j o a r | Nov 21, 09:37 | |
| Ondra Cada | Nov 21, 15:00 | |
| Dustin Voss | Nov 23, 19:49 |






Cocoa mail archive

