Method Calls

Previous Next

Method calls allow you to program application behavior by specifying actions. A method call specifies both the object you want to manipulate and the action you want this object to perform:

MyBrowser_1.Navigate('www.usoft.com')

You can manipulate:

Native USoft objects such as USoft tab pages.

Third party ActiveX objects.

Example 1:

You can create a method call which is triggered by the user clicking a button and which sets the value of a text box to a certain date.

Example 2:

You can have an imported ActiveX web browser control navigate to a URL, as in the syntax example. The URL could have been entered in a native USoft text box by the end user, or by another method call.

Method calls can be created using the special Object Activator tool.

TIP: Before manipulating objects programmatically, make sure you cannot take advantage of the many default USoft facilities.

For example, if you want to display values from a parent window in the top part of a child window, it is easier to use a secondary window than to write method calls.

Notes:

Most USoft method calls return no object. However, in the OO-technology, in a method call like:

MyWindow1.MyObject2.MyObject3.Create()

each element can theoretically be a method or a property; which can take parameters and return an object.

In USoft, examples of method calls which return objects are Self() and Window() which are generated by the object activator.

Examples of properties which return objects are any user-defined properties.