All Forms have a QUITCALL member that the user can pass a standard callback string. This is executed whenever the user presses 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 the user to terminate the application, and so the associated PML callback should prompt the user for confirmation.
If the user confirms the quit, then the callback should close down the application, and not return. If the user decides not to quit, then the callback should return an error to indicate the decision to F&M.
Use return error…noalert if the user wants to avoid displaying an error alert. If the form has no
QUIT callback, then the
QUIT event will be ignored.