Invoke calls a method on an object. Only valid for Object types (including Array and DisplayObject). If a managed value such as an Object is returned, then the Value holding the reference MUST be destroyed before the runtime dies since the Object’s memory will be invalid due to heap deallocation.
Parameters |
Description |
const char* name |
the name of the method to call. |
Value* presult |
Holder for the return value from the called method. presult can be null if no return value is desired. |
const Value* pargs |
An array of arguments that will be passed to the method. |
UPInt nargs |
Number of arguments that will be passed to the method. |
True if the method was invoked otherwise false. A false value will also be returned if the Value is a reference to a display object, and the display object was unloaded.