Getting a Property Value Using a Method Call

Previous Next

See Also

In a method call parameter, you can refer to the current runtime value of a property. Technically, the call to the property value is just another (embedded) method call. The property may be of a native USoft object, or an ActiveX object. The syntax used for getting a property value is:

<object name>.<property name>()

In the Object Activator, first select the parameter node in the Script box where you want to get the property value. Then select the object in the Object Browser pane. Finally, select the property from the Properties tab page, and click Set.

You can only get a property value this way WITHIN the class (the info window, dialog or control class) currently being designed. To refer to properties of objects OUTSIDE the current info box, dialog or control, you need to create user-defined properties.

For example, refer to the current day value of an instance of a MyCalendar subclass of Microsoft's Calendar Control by writing:

MyCalendar.Day()

Refer to the current on-screen value in a NAME field by writing either of the following:

query.name.value()

query.name()

You can omit ".value" because wherever a string is expected, a field object is implicitly converted to the value currently in the field.

To refer to the current on-screen value in a non-database Text Box 1, use:

Variables.Text_Box_1()

Example

To have an inserted Microsoft Web Browser browse to the URL typed into a text box, set the value of the text box's Post-edit property to:

MyBrowser_1.Navigate(Variables.Text_Box_1())