On Mar 31, 1:37 pm, Matthias Ernst <[email protected]> wrote:
> Works for me.
...
>   ft->PrototypeTemplate()->SetIndexedPropertyHandler(GetValue);

Now i'm even more befuddled. i tried various permutations of that, but
none of the handlers were being called. When i switched to the
InstanceTemplate it worked as expected. i only came across that idea
by googling through 3rd-party sources while looking for a working
example.

On Mar 31, 2:09 pm, Matthias Ernst <[email protected]> wrote:
> However:
>
> If you do instance->Set(Number::New(13), Number::New(14)), instance[13] will
> return 14. With the accessor set on the instance template, the accessor is
> called instead. The prototype accessor is only called if the property lookup
> actually reaches the prototype.

That might have been my problem (i'm not sure). i've bound a native
class using the WeakPointer approach and don't have any inheritance
other than the implicit Object parent.

i'm still confused about the difference between the two, but
InstanceTemplate works for me, so i'm happy. :)

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to