All Forms have a QUITCALL member that you can pass a standard callback string. This is executed whenever you press the
Quit/Close icon (X) on the title bar of forms and the main application window.
If an open callback is used then it is called with the FORM object as its first parameter and ‘
QUIT’ as its action string.
For forms of type MAIN, the
QUITCALL callback is executed, if present. This permits you to terminate the application, and so the associated PML callback should prompt you for confirmation.
If you confirm the quit, then the callback should close down the application, and not return. If you decide not to quit, then the callback should return an error to indicate the decision to F&M.
Use return error…noalert if you want to avoid displaying an error alert. If the form has no
QUIT callback, then the
QUIT event will be ignored.