Context Menu Accelerators

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Context Menu Accelerators

Christopher J. Demers
Should context menu Accelerators work?  I have added a context menu item to
SmalltalkWorkspace and was hoping to use the Accelerator as a quick way to
make a keyboard shortcut.  Since I am adding this to a system class I want
to avoid changing system methods if at all possible.  Ian showed me a way to
add accelerators, but I can't think of a place to call the code without
changing a system method.  Any tricks?

I have developed a lookup tool for the SmalltalkWorkspace.  It can be
accessed with the context menu, but I was hoping to have a CTRL-. keyboard
shortcut.  My tool adds functionality similar to VB method lookup.
Obviously it can't be as all knowing as the VB lookup, but it can make some
useful context assumptions.  I will release it as a free goodie after I test
it a bit more and better integrate it into Dolphin.

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Context Menu Accelerators

Blair McGlashan
Chris

You wrote in message news:9me81o$1ra33$[hidden email]...
> Should context menu Accelerators work?  ...

No, in short accelerators on context menus are against Microsoft's GUI
design guidelines so we don't do anything to facilitate their use. Also
since context menu commands should really be on the main menu bar as well,
it usually isn't necessary, though from what you say below I can see why you
would want to do it.

>...I have added a context menu item to
> SmalltalkWorkspace and was hoping to use the Accelerator as a quick way to
> make a keyboard shortcut.  Since I am adding this to a system class I want
> to avoid changing system methods if at all possible.  Ian showed me a way
to
> add accelerators, but I can't think of a place to call the code without
> changing a system method.  Any tricks?

Why not subclass it? You can then replace the view resources with instances
of your subclass.

> I have developed a lookup tool for the SmalltalkWorkspace.  It can be
> accessed with the context menu, but I was hoping to have a CTRL-. keyboard
> shortcut.  My tool adds functionality similar to VB method lookup.
> Obviously it can't be as all knowing as the VB lookup, but it can make
some
> useful context assumptions.  I will release it as a free goodie after I
test
> it a bit more and better integrate it into Dolphin.

Sounds good.

Regards

Blair