Using a PML Function in an Open Callback
- Last UpdatedOct 29, 2024
- 1 minute read
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 the following:
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.