Action Defaults

The Genero BDL runtime system includes an XML file, FGLDIR/lib/default.4ad, that defines decoration and functional attributes for commonly used actions.

If you match the action names used in this file exactly when you define your action views (toolbar or topmenu items, buttons, etc.) in the form specification file, the action defaults attributes defined for this action will be used.

All action names must be in lowercase.

For example, the following line in the default.4ad file defines presentation attributes for the predefined action cancel. The label (text) is defined as "Cance", and an accelerator key is assigned as an alternate means of invoking the action:

<ActionDefault name="cancel" text="Cancel"
               acceleratorName="Escape" />

You can override global .4ad action defaults attributes at different levels. For example, by specifying a TEXT attribute for the action cancel in the form specification file, the default TEXT value of "Cancel" will be replaced with the value "Terminate":

TOPMENU
  ...
  COMMAND cancel (TEXT="Terminate")
  ...

You can create your own .4ad file to standardize the presentation attributes for all the common actions used by your application.

Form specific action defaults can be defined in the ACTION DEFAULTS section of the .per file, as described in the Example: ACTION DEFAULTS in custform.per topic.