Killing Forms
- Last UpdatedOct 25, 2022
- 1 minute read
You can destroy a loaded form definition using the command:
kill !!MyForm
The form is hidden and then its definition is destroyed so that it is then no longer known to PML. You cannot then access the form or its gadgets, members or methods (including its .show() method).
Note:
Normally you will not need to include the kill command within their AppWare.
If you re-show the form using the show command then the system will attempt to demand load the definition again. This is slow and expensive if you have not modified the definition so avoid it and use loadform !!MyForm and !!MyForm.show() instead.
If you execute a layout form !!MyForm... while the form !!MyForm already exists, then it is killed and a new definition is started. This mechanism may be useful because it makes it possible to generate a form definition interactively from within their AppWare.
This can be very powerful but should be used with great care.