Script calls

Syntax

variableName.scriptName
or
variableName.scriptName(arguments)

where:

Description

Whenever you call a property or method on a metatype, MDWorkbench will first look for a script defined on this metatype. If not found, then a regular property or method is searched for. This enables to override easily a Java method with a script.

Examples

// calls the script name, or the method getName() if a script name is not found
myClass.name

// calls the script doSomething(), or the method doSomething() if a script doSomething is not found
myClass.doSomething("hello", true)