The script code should be:
*myObj.setProgressCallback(OnProgress);  //Tell it how to call us back...*

There is no -> operator in javascript!


Its still not working however.
See native C++ code below.
Does that line in RED look correct?
There is no ToFunction() method on args[0] so I did an ugly cast.

Handle<Value>
MyObj::setProgressCallback(const Arguments& args)
{
    //Argument validation left out for brevity
    //Unwrap code left out for brevity...

    Local<Function> funcProgress;
    Local<Object>   thisObject;

    if(iArgs > 0)
    {
*       funcProgress = Function::Cast(*(args[0]));
*
       thisObject = v8::Context().GetCurrent()->Global();
    
       //Save them for later callbacks.
       myObject->m_fnProgressCallack = 
Persistent<Function>::New(m_pIsolate, funcProgress);
       myObject->m_objProgressCallackThisObject = 
Persistent<Object>::New(m_pIsolate, thisObject);
     }
    
    return v8::True();
}

-- 
-- 
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.


Reply via email to