You designed a standard toolbar to accompany a number of forms so the code behind the buttons is written as generically as possible.
One of the features of this toolbar is that the buttons are synchronized with the state of the form. To achieve this functionality, you wrote generic procedures that are placed in an attached library and are called from various triggers.
For example, if the form is in Enter-Query mode, the procedure set_enter_query_mode will disable the Enter Query button, change the icon for the Exit button, and modify its Tooltip to read "Cancel Query" rather than "Exit"’
What must you code to support this approach?
A.
Form-level When-Button-Pressed triggers for each button to call the generic procedures.
For example, a form-level trigger on the Enter Query button as the following code:
set_enter_query_mode;
B.
Item-level Key triggers for each button as well as item-level When-Button-Pressed triggers for each button to call the generic procedures.
For example, the When-Button-Pressed trigger on the Enter Query button has the following code:
set_enter_query_mode;
C.
Block-level Key triggers that call the generic procedures and item-level When-Button-Pressed triggers that call the EXECUTE_TRIGGER() built-in and pass the name of the button as a parameter.
For example, the Key-Entry trigger the following code:
set_enter_query_mode;
The When-Button-Pressed trigger on the Enter Query button has the following code:
EXECUTE_TRIGGER(‘ENTER_QUERY’);
D.
Form-level Key triggers that call the generic procedures and item-level When-Button-Pressed triggers that call the DO_KEY() built-in.
For example, Key-Entqry has the following code:
set_enter_query_mode;
The When-Button-Pressed trigger on the Enter Query button has the following code:
DO_KEY(‘ENTER_QUERY’);