Class com.pvx.util.progress

Abstract class to log progress of a contributed tool action; the information will be displayed in a view that will remain open until the user decides to close it.


Info

The sub-class initialization method must set the following variables which will be used to identify the panel. theCaption$, theDescription$ The sub-class initialization method can also enable the 'CANCEL' button on the "Progress Log" panel by calling the method: _obj'enable_cancel() The sub-class must implement a method to perform the task(s) associated with the contributed tool; this method will be executed once the ProcessLog panel has been loaded and initialized. This logic must be implemented in the method: doWork() If the sub-class has enabled the 'CANCEL' button, the tasks performed by the sub-class must check to determine if the user has pressed the 'CANCEL' button and then set a flag that will cause the processing to abort. This logic should be similar to the following example: isCancelled = _obj'checkCancel() The sub-class method can also disable the 'CANCEL' button on the "Progress Log" panel by calling the method: _obj'disable_cancel()

Inherits

*nomads, ecConstant

Properties

PROPERTY theCaption$, theDescription$  

Set variables used to identify the panel View

PROPERTY screen_id$="PROGRESSLOG"  

Set Panel / Library for Progress log

PROPERTY screen_lib$="com.pvx.util.en"  

Methods

FUNCTION checkCancel()  

Check for user pressing CANCEL button

Returns A simple boolean (0=False, 1=True) to indicate that the cancel button was pressed
FUNCTION createLogFile(aNamePfx$)  
FUNCTION createLogFile(aNamePfx$, btnText$)  

Create a temporary log file to be updated as the process executes; the log file will be deleted upon exit of task

ParameterDescription
aNamePfx$ The start of the work file name.
btnText$ (Optional)The text to use for the label of the 'Special' button when enabled at end of process
Returns A simple boolean (0=False, 1=True) to indicate that the log file was created
FUNCTION disable_cancel()  

Method that can be executed by SUB-CLASS to disable the 'Cancel' button

FUNCTION enable_cancel()  

Method that is executed as part if initialization in SUB-CLASS to enable the 'Cancel' button

FUNCTION enable_special(sLabel$)  

Method to enable the 'Special' button

ParameterDescription
sLabel$ Label to display on button
FUNCTION writeLog(aString$)  
FUNCTION writeLog(aString$, aLogFile$)  

Write text to progress log display and log file

ParameterDescription
aString$ The text to update into the progress log; use SEP character at end of each line for multi-line messages
aLogFile$ (Optional) The name of an existing log file to write the message
FUNCTION writeLogFile(aString$)  
FUNCTION writeLogFile(aString$, aLogFile$)  

Write text to log file only

ParameterDescription
aString$ The text to write to the log file
aLogFile$ (Optional) The name of an existing log file to write the message; if not included, will use the log file created by _obj'createLogFile() method
FUNCTION LOCAL b_close()  

Method that is executed when the 'Close' button is pressed.

FUNCTION LOCAL b_special()  

Method that is executed when the 'Special' button is pressed.

FUNCTION LOCAL disable_special()  

Method that can be executed by SUB-CLASS to disable the 'Special' button

FUNCTION LOCAL doWork()  

This method is called by the PostLoad() method from the com.pvx.util.progress class to perform work for this tool; this tool can use the WriteLog() method to show or update progress as the work is performed

Warning

*** Must be implemented in child class. ***

FUNCTION LOCAL onExit()  

Clean-up required for this panel during exit.

FUNCTION LOCAL PostLoad()  

NOMADS method that is accessed after the panel has been loaded

FUNCTION LOCAL PreLoad()  

NOMADS method that is accessed before the panel is loaded

FUNCTION LOCAL setDescription(aCaption$, aDescription$)  

Set description to be displayed for the log

ParameterDescription
aCaption$ the value to be used for the caption of the view
aDescription the value to be used to describe the work to be logged
FUNCTION LOCAL updateView()  

update information in the view used to display the progress log

FUNCTION LOCAL workDone()  

Method that is called to indicate that all work is completed for the task

Properties inherited from: ecConstant

isFALSE, isTRUE, isYES$, isNO$, chkOFF$, chkON$, chkGRAYED$, errOBJECT, msgYES$, msgNO$, msgCANCEL$, msgOK$, msgRETRY$, msgABORT$, msgIGNORE$, msgNOTONFILE$, msgTIMEOUT$, msgDISABLE, msgACTIVE, retFAILURE, retSUCCESS, retNEW, retWARNING, retCANCEL, retYES, retNO, typALPHANUM, typZEROFILL, typCHARNUM, typMASTERNUM, typALPHANUMNF, typMASTERNUMC, typALPHA$, typNUMBERS$, typALPHANUM$, typALPHANUMNF$, typCHARNUM$, typMASTERNUM$, typMASTERNUMCLEN, LastErrorMsg$, LastErrorNum$

Methods inherited from: ecConstant

element$(), isALPHA(), isDATE(), isNUMERIC(), ParseString(), Position(), QUO$()