Hey there.

I am building a nodejs extension, and hence I have to deal a lot with v8. 
In all generall, v8 is soooo easy to understand; not everything is 
documented, but one can get many things right by just trying some. But I 
just can not find one thing out...

So, I have a C++ class containing a wrapper around a C library. To store 
some data, I want to take advantage of v8::Array. So I put a definition in 
my class for some public properties of type 'Local<Array> myData;' - and in 
my constructor, I use: this->myData=Array::New();

So far, so good. Now the problem. I am assigning an accessor (a getter and 
setter) to myData, and I am pretty bluntly just returning the array in the 
getter. But then, I am pretty baffled by what I get back: 
console.log(typeof addon.myData) returns "number" - and printing it, it 
just says 2.

So my question is: How do I store a v8::Array within a C++ class? To get to 
and from my clas, i am using GetPointerFromInternalField, and the other 
thing for Setting.

Hope you can help me! ^_^

Kind regards, Ingwie

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