The easiest thing to do would be to keep around your original function
template (the one you're using to configure Points), and to call
HasInstance on that.

For example, the Chromium DOM bindings keep a static persistent handle
to the function template for every wrapper type.

On Thu, Jul 2, 2009 at 8:33 PM, zolee<[email protected]> wrote:
>
> Yes, I already found this but I have a little casting problem:
>
> v8::Local<v8::Value> _v = args[0];
> if (_v->IsObject())
> {
>        v8::Local<v8::Object> _o = _v->ToObject();
>
>        v8::Local<v8::Context> _context = v8::Context::GetCurrent();
>        v8::Local<v8::Value> _ft = _context->Global()->Get(v8::String::New
> ("Point"));
>
>        // How to cast _ft to FunctionTemplate (the Point is a
> FunctionTemplate)?
> }
> >
>

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

Reply via email to