Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML and V8 - Javascript doesnt know c++ objects  (Read 1492 times)

0 Members and 1 Guest are viewing this topic.

prchakal

  • Full Member
  • ***
  • Posts: 142
    • View Profile
SFML and V8 - Javascript doesnt know c++ objects
« 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

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.

prchakal

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: SFML and V8 - Javascript doesnt know c++ objects
« Reply #1 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.