The process for associating code with menu items in AcuBench is very straightforward. As you add items to your menu in the Menu Designer, AcuBench automatically associates an exception value with each item. You can either use this default value or use the Property window to enter a different exception value. To associate a menu item with code, select the menu item, then use the Event tab of the property window to create a Link To paragraph for that item.
When you build a menu, it is a good idea to associate keyboard shortcuts with each menu command. There are two ways to do this:
When you use a runtime configuration file to assign a keyboard shortcut, the steps are as follows:
At runtime, the \t becomes a tab character, adding appropriate spacing between the menu item and its keyboard shortcut.
KEYSTROKE Exception=1003 ^A
In the example, when the user presses Ctrl+A, an exception of 1003 is generated. Any code associated with that exception (key-status) value is then executed.
More information about the KEYSTROKE configuration variable can be found in The KEYSTROKE Variable.
Back in the menu designer, use the Event tab of the Property window to create a Link To paragraph associated with the menu item. This paragraph is invoked when a user selects the menu item or uses the keyboard shortcut associated with the menu item.