ACTIVATE
PLBCMP GUI Only
The ACTIVATE instruction makes an object visible and allows the user to interact with it. While the format of the ACTIVATE statement is static, there are a number of considerations for each type object. See the specific object sections for details concerning the activation of the various objects. ACTIVATE uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A previously defined and created object or object pointer that is activated.
routine
Optional. A Program Execution Label called to process information if the user selects the object.
result
Optional. A Numeric Variable indicating the item within the object that was selected.
Flags Affected: NONE
Note the following:
If the {result} field is too small to contain the result value, the OVER flag is set upon entry to the {routine}. This flag setting does not occur at the time of the ACTIVATE butat the time the {routine} is called.
The {routine} is called as if a CALL instruction was performed. It is only called when a EVENTCHECK or EVENTWAIT is executed. The LABEL execution pointer variable cannot be used in an ACTIVATE instruction or a compiler error occurs.
When the {routine} is complete, a RETURN instruction continues execution at the instruction following the EVENTCHECK or EVENTWAIT. Otherwise, a NORETURN instruction clears the return address from the call stack.
All other object operations, such as scroll bar manipulation, movie controls, and screen updating, are automatically performed by the PL/B runtime.
If the object specified by an ACTIVATE instruction has already been ACTIVATEd, the old {routine} and {result} operands are replaced with the new {routine} and {result} operands.
An object must be CREATEd before being ACTIVATEd. If this is not done, a runtime error of O105 is generated.
If insufficient memory is available to perform the operation, a runtime error of O106 is generated.
If a FILEPI instruction is active, it is terminated.
See Also: DEACTIVATE, Object Instructions
![]() |