Hi!
I have run into something that is confusing me again.
Steps that i have done :
1) Expose a new type to JS (lets call it file class).
var f = new file();
file.open( path )
file.close();
*file.path *( a property with a get, set function)
2) Expose a second type, path :
var p = new path('some/file/on/disk.txt');
*3) Accessing file.path from c++ -> This is the problem*
*
*
* myFileClass::Path_SET(...)*
v8::Local<v8::Object> self = info.Holder();
v8::Local<v8::External> external =
v8::Local<v8::External>::Cast(self->GetInternalField(0));
myFileClass* myFile = static_cast<myFileClass*>( external->Value()
);
* How can i access the path from the file? ie ; fileInstance->Get( "path" )
*
*
*
* *i tried self->Get(v8::String::New("path")); but of course,
that calls my accessor on the FILE, not the path.
so inside of *myFileClass::Path_GET *i still cannot obtain the
instance of the c++ side version of the path.
using Get = stack overflow (calling itself recursively)
So in short :
file.path = new Path(); <- how do i access, and replace the existing
path instance from c++ from the parent class (file).
I hope this made sense :)
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users