CObjEx

From STX Wiki
< Programmer Guide‎ | Macro Library
Revision as of 17:31, 18 November 2010 by Admin (talk | contribs) (1 revision: Initial import)
Jump to navigationJump to search

CObjEx : CObj

The class CObjEx is an enhanced base class designed for objects which are used in S_TOOLS-STx scripts.

CObjEx Member Functions

The CObjEx class has the following member functions. See CObj Member Functions for a list of functions implemented in the parent class.

cleanup

Delete all instances of classes based on COBJEX. This function is called automatically by BScript before the application exits.

Usage:

cobjex cleanup

construct

Calls the COBJ constructor and writes a construct message to the script console.

Usage:

cobjex construct

destruct

Calls the COBJ destructor and writes a destruct message to the script console.

Usage:

cobjex destruct

elog

Writes the message "class-instance: ERROR - text" to the script console and exits from 'level' macros with the return value 'result'.

Usage:

cobjex elog level; result; text

Parameters:
level
The number of macro levels to return.
result
The result to set on returning.
text
The text to use write to the console window.

log

Write the message "class-instance: text" to the script console.

Usage:

cobjex log text

Parameters:
text
The text to write to the log window.

logError

Writes the message "class-instance: ERROR - text" to the script console and exits from 2 macros with the return value 'result'.

Usage:

cobjex logError result; text

Parameters:
result
The result to assign after returning.
text
The text to write to the console window.

LogExt

Write text to the CON log window with the option of overwriting the last line. This is useful for progress reports.

Usage:

inst LogExt mode ; text

Parameters:
mode
If 0, the text overwrites the last log window line. If 1, the text is appended to the last log window line.
text
The text to write to the log window.

LogTimer

Start or stop the internal BScript timer. The elapsed time is written to the CON log window.

Usage:

inst LogTimer cmd

Parameters:
cmd
One of the following:
ON|BEGIN - Start the timer. If the timer has already been started, then the elapsed time in seconds is returned. The elapsed time is also displayed in the CON window.
OFF|END - Stop the timer. The elapsed time is also displayed in the CON window.

Navigation menu

Personal tools