method invoke

value invoke();

Argumente

Zurückgegebener Wert

This method creates the moniker, calls the method and waits for completion (blocking). The return value is an value containing the value returned by the called method. If the target is specified by a moniker, the created instance is released after the method call completes.
var messageObj = shell.serviceManager.basics.message;
var retVal;

messageObj.fromURI("ee://aol/basics/bigInt?method=compare&a0=100");

//since bigInt is initialized to 0 on create, this will return -1 for comparing 0 to 100
retVal = messageObj.invoke();

var bigInt = shell.serviceManager.basics.bigInt;
var argList = shell.serviceManager.basics.array;
argList.addValue(100);

//calling invoke with an object
messageObj.target = bigInt;
messageObj.method = "compare";
messageObj.arguments = argList;

//same result as above
retVal = messageObj.invoke();