ui.Dialog.addTrigger

Adds an event trigger to the dynamic dialog

Syntax

addTrigger(
   name STRING )
  1. name is the name of the dialog.

Usage

When implementing a dynamic dialog, the addTrigger() method must be used to register the triggers, that need to be handled with user code:

CALL d.addTrigger("ON ACTION print")

Registered dialog triggers are then typically managed in a WHILE loop using the nextEvent() method, to wait for dialog events.

The following triggers are accepted by the addTrigger() method:

Note: More predefined triggers such as "BEFORE ROW" are existing for dynamic dialogs, but these triggers do not have to be added with the addTrigger() method, since they are implicit.
Table 1. User-defined triggers for dynamic dialogs
Trigger name Description Dialog block equivalent
ON ACTION action-name Action handler for the action identified by action-name. ON ACTION block
ON APPEND Row addition action handler for a display array dynamic dialog. ON APPEND block
ON DELETE Row deletion action handler for a display array dynamic dialog. ON DELETE block
ON INSERT Row insertion action handler for a display array dynamic dialog. ON INSERT block
ON UPDATE Row modification action handler for a display array dynamic dialog. ON UPDATE block