Previous Topic: RemoteTarget.receivedOutput MethodNext Topic: RemoteTarget.result Method


RemoteTarget.receivedResult Method

Event handlers are optional functions that can be implemented in user scripts and called by AutoShell when certain events occur. If present, this event handler is called when the final result value is received from the remote target.

This method has the following syntax:

receivedResult(s)

Note: The AutoShell ignores event handler return values.

Example

Specify result handler for a RemoteTarget and access associated object in the event handler:

rt = new RemoteTarget("ascli1");
// Assign output handler
rt.receivedResult = function(s){
    qout("Result received=", s);
    qout("Originating host=", this.getHostName());
};
run-remote "Math.SQRT2" on rt

See also:

RemoteTarget.result Method