Cmd-1 for help menu item (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: RE: Re: [OT] How to compile Carbon Shared Library w/ProjectBuilde r?
Next thread: Why can't I ignore function results?


Cmd-1 for help menu item   -   Lars Jensen
  Re: Cmd-1 for help menu item   -   Joseph J. Strout
  Re: Cmd-1 for help menu item   -   Lars Jensen
   Re: Cmd-1 for help menu item   -   Joseph J. Strout

Cmd-1 for help menu item
Date: 12.12.02 23:33 (Thu, 12 Dec 2002 17:33:23 -0500)
From: Lars Jensen
I just discovered that cmd-1 invokes the single item in my Help menu, even
though the CommandKey property is blank. I gather the OS is doing this for
me, so I guess I should go ahead and set CommandKey="1", so the user will
see it.

Is there any more to it than that? (Like, is this platform-dependent? Are
there other automatic CommandKey's I should be aware of?)

lj

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: Cmd-1 for help menu item
Date: 12.12.02 23:35 (Thu, 12 Dec 2002 14:35:44 -0800)
From: Joseph J. Strout
At 5:33 PM -0500 12/12/02, Lars Jensen wrote:

>I just discovered that cmd-1 invokes the single item in my Help menu, even
>though the CommandKey property is blank. I gather the OS is doing this for
>me, so I guess I should go ahead and set CommandKey="1", so the user will
>see it.

No, the IDE is doing this for you because the Help menu is used by
the IDE and your app both, and in the IDE, Cmd-1 is the Online
Language Reference item. It won't happen in your built app.

Cheers,
- Joe

Re: Cmd-1 for help menu item
Date: 13.12.02 02:13 (Thu, 12 Dec 2002 20:13:53 -0500)
From: Lars Jensen
>> I just discovered that cmd-1 invokes the single item in my Help menu...
>
> ...the IDE is doing this for you because the Help menu is used by
> the IDE and your app both, and in the IDE, Cmd-1 is the Online
> Language Reference item. It won't happen in your built app.

Is there a way to make it work in the built app? If I assign the CommandKey
it shows up, but doesn't fire. (There's a similar bug filed about
Accelerator keys.)

lj

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: Cmd-1 for help menu item
Date: 13.12.02 05:04 (Thu, 12 Dec 2002 20:04:06 -0800)
From: Joseph J. Strout
At 8:13 PM -0500 12/12/02, Lars Jensen wrote:

>Is there a way to make it work in the built app? If I assign the CommandKey
>it shows up, but doesn't fire. (There's a similar bug filed about
>Accelerator keys.)

The Help menu doesn't support shortcut keys like other menus do. The
Help menu is a weird beast in many ways. We make it (mostly) work in
the IDE by trapping the KeyDown, checking the Keyboard.CommandKey,
and invoking the menu item manually. You could do something similar
(though it would require a declare to actually highlight the Help
menu as part of the response).

Cheers,
- Joe