A form definition must be loaded before the form can be displayed. If you have stored the definition in a
.pmlfrm
file then loading will be automatic when the form is displayed for the first time. Normally, a form is displayed as a result of the operator making a menu selection or pressing a button on a form. This is achieved either by using the Form Directive in the menu or button definition (see next section) or by means of the command show !!formname
used in the gadget’s callback.However, to display forms when you are developing them, you may find it convenient to type the command:
show !!formname
Sometimes it is useful to force the loading of a form’s definition file before the form is actually displayed, so that you can edit the form or gadget attributes from another form’s callbacks before the form is actually displayed. Using the command
loadform !!formname
Once a form has been displayed you can remove it from the screen using the command
hide !!formname
Note that if you show it again it will appear on the screen, but its definition is already known to PML and so it will not be loaded.
It is possible to remove a form definition from PML using the command
kill !!formname
The form is then no longer known to PML until a new definition is loaded.
This post was taken from pdmsmacro
One thought on “Loading and Displaying Forms — Basic PML”