hi!

> I also wrap a C++ global object -- although I don't allow accessors on  
> it, only on objects inside of it.

And how do you retrieve the inner objects of the global object?
For example, let's take classical HTML:
I have a global object called "Window" with a function called "alert
(..)" and
a property named "navigator". As my Window Object is the global
object,
how would someone get access to the "navigator" property for example,
speaking of having the "real" window object underlying as a native c++
one.

> You can just set data to a v8::External holding your global object.  
> This would mean that each global object would have to have its own  
> template, but it will work. You retrieve it from the AccessorInfo  
> object passed to your accessor, by using the Data() function.

Yeah I've figured that one but it would break up all my rules. I
have a very neat system of either getting a (singleton) object
template
or an object instance for an instance of my internal c++ class.
Now as my object templates are shared + cached, there's no chance
to use the Data value thing :(

> I'm not sure how you'd do it with one template, though, without an  
> internal field, which apparently doesn't work.

But I don't see the reason why.. It doesn't make any sense at all. Why
does the
global object work completely differently? Why can I not wrap it up?
As said, fixing api.cc works in some manner to at least correctly
transfer the internal field count, it is just a matter of accessors
not working proberly with the Holder() thing, functions work just
fine..

Alex
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to