GETPROP
8.0.5, PLBCMP GUI Only
The GETPROP instruction retrieves specific properties of object variables. The instruction uses the following format:
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A previously defined and created object, a pointer to an object, the *ARG1 through *ARG10 internal objects, or the *RESULT internal object whose property is returned.
property
Required. A valid property string for a given object.
index
Optional. A property array index.
value
Required. A previously defined variable to which the property value is returned.
Flags Affected: OVER, ZERO
Note the following:
The object must have been previously defined and created.
At least one property string is required.
Valid properties for each object are listed in the object definition section.
The optional {index} may be specified for property arrays.
The internal VARIANT objects named *ARG1 through *ARG10 may be specified for the {object} parameter. These objects represent the ARGn objects for an EVENTREGISTER statement. Note that the *ARGnn objects cannot return results when using the JScript language in HTML pages to execute the EventSend method for a PL/B program object.
The *RESULT internal VARIANT object represents the result returned from a connected 'Plbwin.ProgramNE' object. The *RESULT variant must be used to return results when using the JScript language in HTML pages to execute the EVENTSEND method for a PL/B program object.
A GETPROP of the VARVALUE or VARABSVALUE property value for a VARIANT that was created using the $VT_ARRAY type will retrieve the first variant value in the VARIANT array.
If {value} is a numeric variable and the last property's variable is too small to contain the last property's value, the OVER flag is set.
If {value} is a numeric variable and the last property's value stored is zero (0), the ZERO flag is set.
Any properties available for a NETOBJECT are found in the class library description as specified by the CLASS identification string. All properties must be specified using the '*' syntax format as described under the NETOBJECT description notes.
If a property has a destination variable that is a GUI object and the object has been created, the object is not replaced and it remains unchanged.
When the object is a PLBOBJECT, the properties are retrieved from a FUNCTION found in CLASSMODULE load module specified by the PLBOBJECT object declaration. In this case, a PLBOBJECT property name is accessing a function in the CLASSMODULE that has a PL/B label formatted as 'Get_PropName'. The PLBOBJECT properties use the '*prop=value' syntax format.
Example:
See Also: Example Code, SETPROP, Object Definitions, Properties, Object Instructions
![]() |