It is very simple:
I want to set javascript callback functions where the first parameter is a 
javascript object.
so I have a C++ object, let say a button. When the button is pressed, a 
callback function is called with the button in parameter.
In my v8 code, I create an persistent object template for the button, store 
the button address in the 1st internal field and somewhere else I add a 
method to create a button. 
the button object template has a method to set a callback.
in this setCallback method, I store a persistent with the function in 
parameter (it will be called outside the current c++ method, so after the 
release of the handlescope), a persistent with the global object, a 
persistent with the v8 button object. the problem is with the last one. my 
method to set the callback is called with an local handle on the v8 object 
in parameter (retrieved with: v8::Local<v8::Object> self = args.Holder();). 
I have no way to go from this Local to the persistent I created first, so I 
need to create another persistent from the local, or I managed to find a 
way to retrieve the persistent from the c++ object (for which i have the 
address in the 1st internal field).
Is that more clear?

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