RunBase Class

The RunBase class is a framework for classes that need a dialog for user interaction and that need the dialog values to be saved per user.

class RunBase extends Object implements SysSaveable, SysRunable

Run On

Called

Methods

Method

Description

cancelTimeOut

Cancels a previous method call to the Object::setTimeOut Method. (Inherited from Object.)

canGoBatch

Returns false in this class.

canSwapBetweenCS

Controls whether a calledFrom class that is instantiated on the server should have its prompt executed on the client.

canSwapBetweenCSPrim

Returns whether it is possible to pack the class, reinstantiate a new class on the client or server, and unpack the packed class into the new class.

caption

Returns the description from the current class by calling the static description method on the class if there is one.

checkCloseDialog

Must be called in the RunBase dialog CloseOk method.

cleanupDialog

Provides a way to clean up after a dialog box has been canceled.

dialog

Returns a class that contains the methods that are described by the RunBaseDialogable interface.

dialogClear

Should clear the contents of the dialog.

dialogInit

Initializes the dialog.

dialogMake

Obtains the dialog from a RunBase class.

dialogPost

Makes it possible to add controls after the main dialog() has been run because this method is called after the dialog method is called.

dialogPostInit

Called right after the RunBase.dialogInit Method.

dialogPostRun

Called after Dialog.run Method.

dialogReInit

Reinitializes the dialog.

dialogSelectCtrl

When using the dialog class for dialog, this method is called whenever a control is selected.

dialogTask

When using the Dialog Class for dialog, this method is called from the task method in the dialog form.

dialogUpdate

Updates the dialog, for example after reinitializing the query.

dialogUpdateQuery

Updates the query in the dialog.

equal

Determines whether the specified object is equal to the current one. (Inherited from Object.)

getFromDialog

Assigns the dialog values to the internal variables.

getLast

Gets the last choice that is stored in the last value table.

getTimeOutTimerHandle

Returns the timer handle for the object. (Inherited from Object.)

handle

Retrieves the handle of the class of the object. (Inherited from Object.)

inGetSaveLast

Returns true when the GetLast or SaveLast method is executed.

init

Gives RunBase the same profile as, for example, a FormRun class. This method is not used in the standard application.

initParmDefault

Initializes the internal variables.

initSysSign

isSwappingPrompt

Checks if the program is currently swapping from server to client.

isSysSignUsed

lastValueDataAreaId

lastValueDesignName

lastValueElementName

lastValueType

lastValueUserId

mustLoadSaveQuery

Determines whether the last query must be loaded and saved when you leave the form. Called from SysQueryForm.

name

Returns the name of the RunBase class.

new

Overridden. Initializes a new instance of the RunBase class.

notify

Releases the hold on an object that has called a wait method on this object. (Inherited from Object.)

notifyAll

Releases a lock on the object that was issued by a wait method on this object. (Inherited from Object.)

objectOnServer

Determines whether the object is on a server. (Inherited from Object.)

owner

Returns the instance that owns the object. (Inherited from Object.)

pack

Serializes the current instance of the RunBase class.

parmProgress

Gets or sets the Progress parameter.

parmSysSign

Gets or sets the SysSign parameter.

progressHide

Hides the Progress form.

progressInit

Initializes the Progress object in RunBase.

progressKill

Kills the Progress object in RunBase.

prompt

promptPack

Wraps a call to the RunBase.pack Method when packing in the RunBase.promptPrim Method.

promptPrim

Contains the code for the prompt functionality. The RunBase.prompt Method simply wraps this method.

promptUnpack

Unpacks what the promptPack method has packed.

putToDialog

Enables setting the fields that were just added in the RunBase.dialog Method. This method is called from the RunBase.promptPrim Method directly following the RunBase.dialogMake Method.

queryRun

Returns the QueryRun, which is used by the QueryPrompt.

reset

Resets the class to its default state.

run

Contains the code that does the actual job of the class.

runBase

Returns the RunBase itself.

saveLast

Saves the last choice by using the RunBase.pack Method.

setGetLastCalled

Sets the internal inGetSaveLast variable.

setInPrompt

Sets the internal inPrompt variable.

setIsSwappedFromServer

Sets the internal isSwappedFromServer variable.

setTimeOut

Sets up the scheduled execution of a specified method. (Inherited from Object.)

showClearButton

Determines whether to add a Clear button to the dialog. If you change the return value to true it will add the button.

showDefaultButton

Determines whether a Default button is to be added to the dialog. If you change the return value to true, it will add the button.

showDialog

showIndexFields

If this method returns true, it will look for the first enabled index when you are adding query range fields to the dialog and if a data source does not have any ranges specified. It will also show the visible fields from that index.

showQuerySelectButton

showQueryValues

Determines whether a Select button is to be added to the dialog. If you change the return value to true, the button will be added.

sysSignFieldId

sysSignTableId

sysSignValidateEmployee

toString

Returns a string that represents the current object. (Inherited from Object.)

unpack

Deserializes the packedClass parameter value to an instance of the RunBase class.

usageCount

Returns the current number of references (the value of the reference counter) that the object has. (Inherited from Object.)

validate

Validates the state of the internal variables.

wait

Pauses a process. (Inherited from Object.)

xml

Returns an XML string that represents the current object. (Inherited from Object.)

::description

Gets the description of the class.

::getDescription

Returns a description of the specified class.

::getHelpText

Returns the Help text from the class with the specified classId.

::getVersion

Returns the version number from a container with a packed class.

::makeObject

Instantiates a RunBase class with the specified class ID.

::makeObjectOnClient

Instantiates a RunBase class on the client.

::makeObjectOnServer

Instantiates the RunBase class on the server.

::promptOnClient

Creates a RunBase on the client, unpacks the packed container, runs prompt, and returns the status from prompt, as well as the packed client RunBase.

Remarks

All major update jobs must inherit from this class or from one of its closest inheritances.

The class contains a dialog() method that returns an object that must have the methods that are described by the RunBaseDialogable Interface.

To get or set parameters in the class, create methods that are named by the variable name prefixed with parm, for example parmTransDate(). Methods that set other variables in the class are prefixed with initParm.

These methods are used, for example, when the dialog is a form that is created in the tree. In this case, each edit method can make a callback to the class Parm or to the InitParm methods.

When the Dialog class is used, the variables are set within the dialog() method, and are retrieved within the getFromDialog() method.

If a job must be able to run in batch, use the RunBaseBatch Class.

Be aware of what is packed and what is not, especially when a class is swapped from server to client. For more information, see RunBase.pack Method and RunBase.canSwapBetweenCS Method.

Example

The following code examples demonstrate the use of the RunBase class. However, they will not compile since the MyRunBase class has not been created.

static void main(args a)
{
    MyRunBase my;
    ;
    my = new MyRunBase();
    if (my.prompt())
    {
        my.run();
    }
}

The following example sets a variable, which is saved in the SysLastValue Table.

static void Main(args a)
{
    MyRunBase my;
    ;
    my = new MyRunBase();
    my.getLast();
    my.parmXx(systemDateGet());
    if (my.prompt())
    {
        my.run();
    }
}

See Also

RunBaseBatch Class

RunBaseReport Class

Dialog Class

Dialog.run Method