Recovery
System
       
Subsystem
list
       
Top
level


The RECapplication Class

This is a recovery object that handles recovery for one entire application. The base state for the application consists of the following: The base state for an application also typically includes the following, but these are handled by separate recovery objects contained within the RECapplication:

Declaration

winclass RECapplication : RECgroup

Overridden Methods

boolean IsHappy (RECphase ePhase, boolean logFirstFailure)
boolean BeHappy (RECphase ePhase)
boolean MakeHappy (RECphase ePhase, RECobject r)

New Methods

window SetActiveWindow (window w)
window GetActiveWindow ( )
list of RECwindowUid GetOpenWindows ( )
boolean CloseWindow (RECwindowUid uWindow)


RECapplication::IsHappy

Returns TRUE if and only if all of the following conditions are met:


RECapplication::BeHappy

This method calls its inherited method, RECgroup.BeHappy. If the inherited method returns TRUE, this method sets the currently active window (if specified).


RECapplication::MakeHappy

This method handles the exception X_REC_OBSCURED_BY_WINDOW. It attempts to close the offending window (the one that's doing the obscuring, not the one that's obscured) by calling CloseWindow. If the window is successfully closed, this method returns TRUE. In all other cases, it returns FALSE.

For more information, see RECgroup.MakeHappy.


RECapplication::SetActiveWindow

Use this method to specify which window you want to be the active window. You can choose to not specify any window at all. This method does not actually make the window active; that does not happen until the recovery object is invoked (i.e. during recovery).

Declaration

window SetActiveWindow (window w)

Inputs

w
The window to be the active window, or NULL if you don't care.

Outputs

Returns
The window that was previously set to be the active one, or NULL.

Overriding

You should never need to override this method.


RECapplication::GetActiveWindow

Returns the window that the recovery object will set to be the active window, or NULL if no such window has been set. Note that this may be different from the window that is currently the active window in the application. This method returns what the active window should be, not what is actually is.

Declaration

window GetActiveWindow ( )

Inputs

(none)

Outputs

Returns
The window that is to be the active one, or NULL.

Overriding

You should never need to override this method.


RECapplication::GetOpenWindows

This method returns a list of all the windows that are currently open in the application. This method exists to support the RECunwantedWindows class.

Declaration

list of RECwindowUid GetOpenWindows ()

Inputs

(none)

Outputs

Returns
A list of window UIDs, one for each window that is currently open.


RECapplication::CloseWindow

This method closes an application window that is identified by a RECwindowUid. It returns TRUE if the window is successfully closed, or FALSE if the window cannot be closed for some reasonable reason, such as being made inaccessible by a floating window or modal dialog. This method exists to support the RECunwantedWindows class.

Declaration

boolean CloseWindow (RECwindowUid uWindow)

Inputs

uWindow
A list of window UIDs, one for each window that is currently open.

Outputs

Returns
TRUE if the window was successfully closed; FALSE if it could not be closed for some reasonable reason.

Overriding

When overridden for a particular application, the method must have enough knowledge of each window in the application to be able to close it.



This page is maintained by (REMOVED).
Last updated 8 March 1999.