I'm  confused how to use these two template.  I've looked at two
examples where there seems to be contradictory information.  I want to
create to expose an object from C++ to Javascript but the user should
be able in Javascript to construct the object and to extend the object
in Javascript.

In one example the guidance is to use two FunctionTemplates:  one to
represent the object and the other to represent the constructor.  In
another example the ObjectTemplate::SetCallAsFunctionHandler method is
used to handle object construction.  However the PrototypeTemplate is
a member of the FuncitonTemplate.  It would seem to me that
ObjectTemplate should be a derive class of FunctionTemplate but I'm
really confused as which one should be used to expose C++ object to
Javascript.

Can someone provide some guidance and provide an example.  Also if you
use a code snippet please explain the object construction.  I've seen
snippet where variable are introduced without any prior reference and
that severely confused me since I couldn't see how the variable was
constructed.

Thanks in advance
christy

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

Reply via email to