SFML community forums

Help => General => Topic started by: prchakal on September 16, 2012, 07:25:07 pm

Title: SFML and V8 - Javascript doesnt know c++ objects
Post by: prchakal on September 16, 2012, 07:25:07 pm
Hi ppl,

I made with help of people from here a running version of a program that integrate v8 and sfml.

But my problem now is that javascript doesnt know my objects and get an error on console when i execute the program:

Quote
<unknown>:232: Uncaught TypeError: Object [object Object] has no method 'walkForward'

But my class is created as same of sf_v8 classes.

You can see here:
https://github.com/prsolucoes/sfml-cmake (https://github.com/prsolucoes/sfml-cmake)

My class that is sent to v8:
Quote
https://github.com/prsolucoes/sfml-cmake/blob/master/JSCharacter.h

And my main file that send it to v8:
Quote
https://github.com/prsolucoes/sfml-cmake/blob/master/main.cpp
LINES: 86:92

Thanks.
Title: Re: SFML and V8 - Javascript doesnt know c++ objects
Post by: prchakal on September 16, 2012, 11:16:48 pm
Hi,

Problem solved.

After try too many things and analyse other codes and v8, i see that i forgot one thing, put the reference of my method on REGISTER method.

Problem solved and commited to github.