PML Customisation
User Guide
Form and Gadget Callbacks
:
PML Open Callbacks
: Using a PML Function in an Open Callback
Using a PML Function in an Open Callback
All the examples so far have used form methods as open callbacks. The code would be essentially the same if you used PML Functions. The PML Function must be in a file of its own called
control.pmlfnc
. The body of the definition would be identical but must be bracketed by:
define function !!Control( !object is GADGET, !action is STRING)
. . .
endfunction
Note:
The function has a global name
!!control
, that is, it is not a member of any form or object and thus cannot use the
!this
variable.
The open callback on the
choose
list gadget would become
list .choose callback '!!control(' multi width 15 height 8
The rest of the story remains the same.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.