Understanding declarative dialogs
Declarative dialogs are defined with DIALOG
blocks at the
module level.
A declarative dialog block is a module element defined at the same level as a
FUNCTION
or REPORT
routine:
-- Module orders.4gl
SCHEMA stock
DEFINE arr DYNAMIC ARRAY OF RECORD LIKE orders.*
DIALOG orders_dlg()
DEFINE x INT
DISPLAY ARRAY arr TO sr_orders.*
...
END DISPLAY
END DIALOG
The name of a declarative dialog is mandatory. It can be referenced by a
SUBDIALOG
clause, by a START DIALOG
and TERMINATE
DIALOG
instruction, and can identify sub-dialog actions with a prefix. Specifically, the name of the declarative dialog will be
referenced in a START DIALOG
and TERMINATE DIALOG
instruction to
implement parallel dialogs.
When using the DIALOG
keyword inside a declarative dialog block to use
ui.Dialog
class methods, it references the current instance of the dialog
object.