NAME

CQCC::IOClearPrompt - ClearPrompt subclass of IOBase for user and system interaction methods


CLASS DESCRIPTION

The IOClearPrompt class is a subclass which provides an alternative set of user interaction methods (IOPrompt, IOMessage, and IOListSelect) that use the ClearPrompt GUI utility instead of a text menu.

SUPPORT POLICY: See TriggerCQCC.pm for the Rational Support Policy.


METHODS

ClassInit()
This class function is automatically invoked to define class parameters using CQCC::Parm objects. Currently there are no local parameters.

ClassTest(@args)
This class function sets IOBaseInterface to make an instance of IOClearPrompt then runs the class test for IOBase.

new CQCC::IOClearPrompt()
This method initializes the object's attributes.

ListSelect(multiChoice, titleMsgTag, choiceMsgTagList...)
This method presents a menu with a title described by ``titleMsgTag'' and one or more options to select from described by the remaining arguments. If multiChoice is 1 then multiple choices are allowed, otherwise only one choice is provided.

In the ClearPrompt implementation, the choices are displayed in a scolling ``list'' type menu and the user is expected to pick one or more lines in the list.

The selected items will be returned as a list to the caller, using the original choiceMsgTag items in their entirety for the caller to match to expectations.

The return value consists of a list containing the a flag to abort (1 for abort, 0 for continue) and the answer(s).

Message(type, abort, [msgtag, args])
This method (called through IOMessage()) will display its message to the user, after translating the msgtag and its arguments into the corresponding message catalog entry. Display is handled by calling the Prompt() method.

The type value may be ``INFO'', ``WARN'', ``ERROR'', or ``FATAL'' and is intended to qualify how the message is to be shown and whether or not the message affects the overall trigger status. If ``FATAL'' the status will be set to failed and the trigger will try to cleanly unwind and report failure back to the original caller, usually ClearCase.

The abort flag is also used to signal general failure for terminal conditions and will be combined with the type information shortly.

Print(print-args)
This method handles print operations, allowing prints to be redirected to a log as well as stdout.

Prompt(keys)
This method (called through IOPrompt()) will display its message to the user, after translating the msgtag and its arguments into the corresponding message catalog entry.

The return value consists of a list containing the a flag to abort (1 for abort, 0 for continue) and the answer(s).

($abort, $answer) = $obj->Prompt(keys);

_ClearPrompt(command)
This method will finish formatting the ClearPrompt command string and execute it. On the PC it writes out the ClearPrompt command to a file to workaround known bugs.

The return value consists of a list containing the a flag to abort (1 for abort, 0 for continue) and the answer(s).

($abort, $answer) = $obj->Prompt(keys);