background image
<< Recovery System - How the recovery system starts the application | Recovery System - To specify statically the keys >>
Recovery System - Specifying new window closing procedures
<< Recovery System - How the recovery system starts the application | Recovery System - To specify statically the keys >>
User's Guide
293
15 U
NDERSTANDING
THE
R
ECOVERY
S
YSTEM
Specifying new window closing procedures
To ensure that only the main window is open, the recovery system attempts to
close all other open windows, using an internal procedure that you can
customize when necessary.
To make sure that there are no application windows open except the main
window, the recovery system calls the built-in CloseWindows method. This
method starts with the currently active window and attempts to close it using
the sequence of steps below, stopping when the window closes.
If any of the steps fails, none of the following steps is executed and the
recovery system raises an exception.
1
If a Close method is defined for the window, call it.
2
Click on the Close menu item on the system menu (on platforms and
windows that have system menus).
3
Click on the window's close box (if one exists).
4
If the window is a dialog, type each of the keys specified by the
OPT_
CLOSE_DIALOG_KEYS
option and wait one second for the dialog box to
close. By default, this option specifies the Esc key.
5
If there is a single button in the window, click that button.
6
Click each of the buttons specified by the
OPT_CLOSE_WINDOW_
BUTTONS
option. By default, this option specifies the Cancel, Close,
Exit, and Done keys.
7
Select each of the menu items specified by the
OPT_CLOSE_WINDOW_
MENUS
option. By default, this option specifies the File/Exit and the
File/Quit menu items.
8
If the closing of a window causes a confirmation dialog to appear,
CloseWindows attempts to close the dialog by clicking each of the
buttons specified with the
OPT_CLOSE_CONFIRM_BUTTONS
option. By
default, this option specifies the No button.
When the window (and any resulting confirmation dialog) closes,
CloseWindows repeats the preceding sequence of steps with the next window,
until all windows are closed.
Specifying new window closing procedures
When the recovery system cannot close a window using the procedures
described in the preceding section, you can reconfigure it in one of two ways: