Declaration: | trigger menu
|
Applies to: | Application Shell, Form |
Activation: | Activated by the structure editor function ^MENU, if the menu triggers of objects at a lower level in the component structure are empty, or if they contain a $callup instruction. |
Default behavior: | If no ProcScript is present in this trigger, the menu trigger for the next level of object is activated. If the application-level trigger is empty, there is no action. |
Behavior upon completion: | None |
Description
The menu trigger is usually used to activate a menu bar. If ProcScript is present in this trigger, the structure editor direction is set to Next. For more information, see macro.
Uniface uses a fall-through mechanism when processing the ^MENU structure editor function. It first activates the field-level menu trigger. If this trigger is empty, it activates the entity-level menu trigger, and so on for the component-level and application-level menu triggers. The first trigger containing ProcScript is executed without activating the subsequent menu fall-through triggers.
ProcScript in the field-level menu trigger normally overrides the entity-, component-, and application-level menu triggers. However, using the $callup function, it is possible to activate these triggers when the current field contains ProcScript in its menu trigger. For more information, see $callup.
The following example activates the form OPTIONS in response to the ^MENU function. This example only works if the component-level, entity-level, and field-level menu triggers are empty.
trigger menu ; on application shell activate "OPTIONS" end; menu trigger