Recovery 
System 
       
PRODUCT 
Recovery System 
       
Subsystem 
list 
       
Top 
level 

How to Convert Scripts from the Old to the New Recovery System

This page provides a cookbook approach to converting existing scripts from using the old Recovery System to using the new Recovery System.
Include 
Files 
Default 
Recovery 
Object 
Adding 
Windows 
to the 
Base State 
Setting 
the 
Active 
Window 
Creating 
New 
Recovery 
Objects 
Removing 
Windows 
from the 
Base State 
Initializing 
the Project 
Window 
Scripts 
that Have 
Already Been 
Converted 
Scripts
that Need
To Be
Converted


Include Files

If your script includes "MCFrame.inc", change it to "MCFrame2.inc".
If your script includes "recover.inc", change it to "RECentryPoints.inc".

Only scripts (.t files) should include the files mentioned above. Other include files should never include them.
If you get errors that symbols such as ScripEnter have been multiply defined, then somehow you are including both "recover.inc" and "RECentryPoints.inc".



Default Recovery Object

Add the following line near the top of your script (not inside any function):

        RECobject grRECinitial = grMCrecDefault; // set up initial recovery object



Adding Windows to the Base State

Replace each call to gwMCmainWin.AddToBaseState with a call to RECgetActive().InsertBefore. Where you used to pass a window to gwMCmainWin.AddToBaseState, you must pass a corresponding recovery object to RECgetActive().InsertBefore.

If the window is a one-of-a-kind window, such as the Timeline, Composer Window, Project Window, or Digitize Tool, there should already be a pre-defined default recovery object that you can use. You can find a list of them here.

If the window is something you could have many of, such as Bins, Popup Monitors, or Deck Controllers, then you must create a new recovery object for every such window. There are routines that do this:



Setting the Active Window

Replace each call to gwMCmainWin.SetBaseStateWindow with a call to RECgetActive().SetActiveWindow.



Creating New Recovery Objects

If one of your windows has no recovery object and it's derived from QChildWin, you can create a recovery object like this:
window RECchildWin grXXXrecDefault        // replace XXX with subsystem prefix
{
    window        _wTarget = gwXXXwindow;           // the subsystem window
    RECwindowUid  _uTargetUid = RECmakeWindowUid(
                      "UI_SHELL_CLASS",  // the UI Shell (internal) class of the window
                      "WINDOW_CAPTION"); // the title (caption) of the window
};
You can determine the UI Shell class by using the debug window in the application.



Removing Windows from the Base State

Replace each call to gwMCmainWin.RemoveFromBaseState with a call to RECgetActive().Remove. Just as with adding windows to the base state, you must pass a recovery object rather than a window.

You must remove recovery objects for windows that you close at the end of the script, otherwise the recovery system will report errors during ScriptExit. This is new behaviour that the old recovery system didn't have.



Initializing the Project Window

You may need to add a call to gwPRJwindow.Init() near the top of your script.



Scripts That Have Been Converted

The following scripts have been converted to use the new recovery system:
Acceptance.t 
AudioEQUI.t 
AudioMixdownPerf.t 
AudioMixUI.t 
AudioToolUI.t 
AudioWorkflow.t 
COMPANYCalcFunc.t 
COMPANYCalcSmoke.t 
COMPANYCalcUI.t 
BinCompatibility.t 
BinFunc.t 
BinSmoke.t 
BinUI.t
CommandPalUI.t 
ConsoleUI.t 
DeckCtrlUI.t 
DigiCutSmoke.t 
DigiCutFunc.t 
BEroundTripFunc.t 
EffectPalUI.t 
EffectParameterUI.t 
EffectSmoke.t 
ExportFunc.t 
ExportSmoke.t 
ImportBatchSmoke.t 
ImportFunc.t
ImportSimpleSmoke.t 
ImportSmoke.t 
MCfloatingWinUI.t 
MCmakeLongRandSeq.t 
MCtoolMenuTest.t 
MCtrimSmoke.t 
ProjWinSmoke.t 
ProjWinUI.t 
ProjSelectionDlogSmoke.t 
TitleToolSmoke.t 
TitleToolUI.t
Performance.t


Scripts That Need To Be Converted

The following scripts need to be converted to use the new recovery system:
Smoke Tests 
DigitizeFilmTest.t 
NCDigiToolSmoke.t 
Unit Tests 
RTFXRender.t 
RTFXSingleStep.t 
SWFXRender.t 
UTaudioVideoSync.t 
UTdroppedDuplicatedFrames.t 
UTframeAccuracy.t 
VideoMixdown.t
Functional Tests 
NCDigiToolLogging.t 


This page is maintained by (REMOVED).
Last updated 05 Jan 2000.