Key labels versus action defaults
In Four Js Business Development Suite (BDS), labels can be defined for keys such as
accept
, F10
or Control-Z
. With this feature, it
is possible to easily decorate ON KEY
or COMMAND KEY
blocks with a
button in the action panel.
Key labels can be specified at different levels. At a global level with FGLPROFILE settings, at
the program level with the fgl_setkeylabel()
function, at the form level with the
KEYS
section, at dialog level with the fgl_dialog_setkeylabel()
function, and at the field level with the KEY="label"
attribute. For more details,
see Setting action key labels.
With Genero Business Development Language (BDL), interaction statements can define actions with
the ON ACTION
blocks. These action handlers are more abstract than ON
KEY
: You identify an action by a name, while decoration is defined in form files (
ACTION DEFAULTS
section) or in global configuration files
(.4ad file).
When adapting your code for Genero, you are free to use the traditional ON KEY
blocks or the new ON ACTION
blocks. Genero still supports the key label settings as
in Four Js BDS. However, key label settings will overwrite action defaults settings. Additionally,
if the name of the key specified in the ON KEY
clause does not only contain
alphanumeric characters (such as Control-Z
), it will not be possible to define
action defaults attributes for these action handlers, as action names must be simple identifiers.
This is also true for Menu COMMAND
labels, for example with COMMAND "Exit
program"
.