I'm trying to do a simple callback into a JS script.
The script does something like this:
function OnProgress(percent) {
//Do something
}
myObj->setProgressCallback(OnProgress); //Tell it how to call us back...
My native C++ code stores the function passed to setProgressCallback in a
Persistent<Function> then proceeds to call it later when appropriate.
The call is performed like this:
Handle<Value> argv[1];
argv[0] = v8::Number::New(100);
TryCatch try_catch;
Handle<Value> result = myStuff->m_fnProgressCallack->Call(???, 1, argv);
What is the 1st parameter to the Call() method supposed to take?
What is the "receiver" object?
Passing in an empty handle breaks it. If I pass in the function itself I
get this error:
"called_non_callable"
What is the secret?
--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.