Menu accelerator keys not working (OpenInsight 32-Bit)
At 03 JUN 2005 10:18:10AM Gerald Lovel wrote:
My application has an MDI frame with child windows having many accelerator keys; essentially, keys Ctrl-A through Ctrl-Z. When I open an OpenInsight tool from the Application Manager, say Delete Entities, then I switch back to my MDI frame and return the focus to its child window, the accelerator keys stop working. The menu works, just not the accelerator keys. Why?
At 06 JUN 2005 06:02AM Oystein Reigem wrote:
Gerald,
I have menus with accelerators on the frame and have never noticed any problems. But you have your menus on the child windows, right? I guess it's too much work to redo that.
How is it again - can one have menus both places - both frame and child? I don't remember any more. If so - have you got menus both places? If so - what about having hidden menu items with accelerators on the frame menus, and let the handlers for those new items send messages to the corresponding items in the child's menu?
- Oystein -
At 07 JUN 2005 08:22AM Gerald Lovel wrote:
Hi Oystein,
Actually, I have a very nice menu scheme. The MDI fame is menu-less, but a special form contains the application menu which is added to the MDI frame at login time. This happens so that access security can be checked before displaying the menu. Access security may be set by access level, by item, by user, so each user could conceivably see a "different" application menu.
Functions specific to a child window sit on the window, while separate forms contain the general editing options for the type of window (data-bound entry, depository/data-bound entry, and collector). At create time the window-specific and general editing menus are added to the child window, which is then displayed as the MDI menu.
Since child menus replace the MDI application menu, one of the general editing options is to put Up the other menu (hot key Ctrl-U). When the menu is switched out, the next menu selection causes the menu to revert to the MDI child menu again. This way, the user is not confused by contextually inappropriate menu selections related to the current window, but application reentrance is preserved. You may guess that the application menu does not have accelerator keys, only the child editing menu does.
The issue of accelerator keys is related to certain OI utility windows which were not written with the OI IDE. These utilities seem not to honor the standard event processing, instead they co-opt (and lose) the keypresses even when they do not have focus. For example, if the Delete Entity window is open but an MDI child entry window has focus, the Ctrl_A (Select All) accelerator keypress never generates a menu event for my child window.
This is not an issue for my running application, since users will be unable to access OI designer forms. I just wondered why it is an issue for the developer?
At 07 JUN 2005 09:34AM Oystein Reigem wrote:
Gerald,
I see. I didn't get the point with the OI tool.
Must confess I don't follow all the details of your menu scheme. I'm not certain if what you say is that accelerators would work with a different way of doing menus, but that you need to keep your way. Or if you think they would fail anyway.
I tried the same as you with my own MDI app, which has a different menu scheme, with menus strictly on the frame. I brought up Delete Entities, and my accelerators still worked. OI 4.1.2.
Probably can't be of any help to you.
- Oystein -
At 07 JUN 2005 09:53AM Ray Chan wrote:
Ditto here too.
Switched to Delete Entities and back and still able to use A-Keys in child window.
hth,
Ray
At 07 JUN 2005 10:01AM Sean FitzSimons wrote:
Folks,
Using 7.1.1, I open the UI Workspace. I then open the Delete Entity dialog from the Application Manager. I go back to the UI Workspace, press ctrl + o and voila, nothing happens.
We will look into this Gerald.
Thanks,
Sean