GETPROP


8.0.5, PLBCMP GUI Only

square.png Objects

 

The GETPROP instruction retrieves specific properties of object variables. The instruction uses the following format:

 

 

[label]

GETPROP

{object},{property}:

 

 

 

[({index})]={value}[,{property}={value}...]

 

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:

  1. The object must have been previously defined and created.

  2. At least one property string is required.

  3. Valid properties for each object are listed in the object definition section.

  4. The optional {index} may be specified for property arrays.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. If {value} is a numeric variable and the last property's value stored is zero (0), the ZERO flag is set.

  10. 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.

  11. 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.

  12. 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.

  13. Example:

          GETPROP PLBOBJECT,*Prop1=value: //'Get_Prop1' in CLASSMODULE

                            *Prop2=value //'Get_Prop2' in CLASSMODULE

     

     

    See Also: Example Code, SETPROP, Object Definitions, Properties, Object Instructions



PL/B Language Reference GETITEM INSERTITEM