Book a Demo
Prev Next

Invoking Methods

Access

On the Workbench window, right-click on the instance on which to execute a method, and select 'Invoke'.

Ribbon

Execute > Tools > Tester > Open Object Workbench

Actions

Action

Details

See also

Choose Method

Select a method from the list and click on the Invoke button.

Note that all methods listed are public; private methods are not available.

Invoking methods in the Object Workbench

Provide Arguments

In this image, the method to be invoked takes an array of objects as its only argument. You construct this argument by naming the other instances on your Workbench that you want to pass to the method.

Providing arguments to method calls in the Object Workbench

Argument Types

These are the parameter types supported by the Workbench:

  • Strings
  • Numbers
  • Objects
  • String Arrays
  • Object Arrays

Argument Syntax

  • Strings as arguments - Surround strings with quotes where necessary; for example, to avoid conflict with Workbench object names
  • String Arrays as arguments - Enter the elements that compose the array, separated by commas; for example:

         "A maths book","A geography book","A computer book"
  • Objects as arguments - Type the Workbench object name as the argument; the debugger checks any name entered in an argument against its list of Workbench instances, and will substitute that instance in the actual call to the method
  • Object Arrays as arguments - Enter the Workbench objects' names to satisfy the argument, separated by commas:

         Tom,John,Peter

Invoke

Click on the Invoke button to execute the method.

Output confirming this action is displayed in the Debug window.

Confirmation of the methods execution in the Object Workbench
Run the Debugger