whoops, sorry.  I jumped the gun on that last email.  I don't know set
accesors for static vars. 

> vlad,
> 
>       I think the attached example is what you want.   But, I can't say if
>       it's the "proper" way as I'm still learning the api.  This was just
>       one of my test files.
> 
>       -august.
> 
> 
> > 
> > Is there anyone out there that knows how to do this, or if this is
> > even possible?
> > 
> > > Hi,
> > >
> > > I've been trying to add static variables getter/setter to function
> > > templates, but have not found the proper way to do it.
> > > I have successfully added instance getters/setters and instance
> > > variable callbacks. Also, I was able to get the static function calls
> > > working.
> > >
> > > Let's assume class Foo;
> > >
> > > // I have successfully installed C++ callbacks for objects in the
> > > following statements:
> > > var f = new Foo;
> > > f.someVar = x;
> > > var y = f.someVar;
> > > f.bar();
> > > Foo.staticCall();
> > >
> > > But I have not been able to do this:
> > > Foo.staticVariable = x;
> > > var y = Foo.staticVariable;
> > >
> > > I've been looking all day at v8.h,, process.cc, this mailing list, but
> > > have not found the proper code snippets to make it happen.
> > >


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

Reply via email to