OBJECT


9.0, PLBCMP GUI Only

square.png Instructions

 

An OBJECT variable is a generic object pointer. To define an OBJECT, use one of the following statement format:

 

 

[label]

OBJECT

[%]

 

[label]

OBJECT

(arraysize)

 

[label]

OBJECT

^

 

[label]

OBJECT

^,{target}

 

[label]

OBJECT

^(arraysize)

 

[label]

OBJECT

^(arraysize),({target),...,{target})

 

Where:

label

Optional. A Data Label.

%

Optional. Denotes the item as being GLOBAL.

arraysize

Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.

^

Optional. Denotes the item as being a POINTER. The OBJECT data variable is always implemented as a POINTER whether this syntax format is used or not.

target

Required. The name of a previously defined data item of the same type.

Flags Affected: NONE

Note the following:

  1. The OBJECT data variable is a pointer and must be initialized to a valid GUI data object before its use. Otherwise, an appropriate FORMAT error occurs.

  2. The OBJECT data variable is allowed in the following PL/B instructions: CALL USING parameter, CHECKPROP, EVENTREG, EVENTSEND, GETPROP, LISTDEL, LISTGET, LISTINS, LOADADR, MOVEADR, MOVEPTR, ROUTINE parameter, SETFOCUS, SETPROP, STOREADR, and ROUTINE.

  3. The OBJECT data variable is not available in the following PL/B instructions. The compiler gives an error when detected in: ACTIVATE, CHECKITEM, CREATE, DEACTIVATE, DELETEITEM, DISABLEITEM, DRAGITEM, ENABLEITEM, EXPLODE, GETITEM, IMPLODE, INSERTITEM, {OBJECT}.Methods, SETITEM, and SETWTITLE.

  4. In a GETPROP or SETPROP instruction, an O159 error occurs when an invalid property is specified for the object pointed to by an OBJECT data pointer.

  5. The CHECKPROP instruction reports whether a property is allowed for the object pointed to by an OBJECT data pointer.

 

 

See Also: Example Code, Object Definitions, Object Output Instructions

 



PL/B Language Reference NETOBJECT PANEL