Method AutomationObject():getProperty() Foundation

Gets the value of a property.

Syntax
:getProperty( <cName> | <nID> ) --> xValue
Parameters
<cName>
<cName> is the name of the property.
<nID>
<nID> is the numeric ID identifying the property. The ID of a property can be queried by the method :getIDsOfNames().
Return

The data type of the result is defined by the method that is called. If a property is accessed which is not known to the COM/ActiveX component, a runtime error occurs.

Description

:getProperty() returns the value of a property of an ActiveX component. The result can be of any data type. In case the property is of type object ("O"), then an object of class AutomationObject is returned.

Normally, method :getProperty() need not be called directly by applications. Instead, property values can be accessed via the assignment operator (:=).

// Property access via method :getProperty() 
oProp := oAuto:getProperty( "Prop" ) 

is equivalent to

// Property access via assignment operator 
oProp := oAuto:Prop 

Calling :getProperty() is required when accessing properties of a COM/ActiveX component that have the same name as an instance variable of the AutomationObject.

When values are accessed from a property, then Xbase++ data types are automatically converted from COM/ActiveX data types. See the method :callMethod() for further reference.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.