On Wed, Jul 6, 2011 at 7:32 PM, HdcDst <[email protected]> wrote:

> The problem was, that I tried to instantiat a template before I set up
> a context scope.
> Setting up a context, getting the global object instead the global
> template, and then setting
> the point_object as a property of the global object worked
>

Incidentally... i recently wrote a class which handles this setup for you,
specifically because i could never remember the proper setup ordering
(almost any setup order compiles fine but all but the correct ordering
assert at runtime). This _might_ be useful for you:

Short demo:
http://code.google.com/p/v8-juice/wiki/V8Convert_Shell
The code:
http://code.google.com/p/v8-juice/source/browse/convert/include/v8/convert/V8Shell.hpp

that class is _almost_ "standalone" - its only dependencies are v8 and the
STL except for two internal uses of a StringBuffer class (which works like a
std::ostringstream but also handles v8 types). i'll make a note of factoring
out that dep so that others can steal that class for use independent of the
lib it lives in.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

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

Reply via email to