aspose file tools*
The moose likes Game Development and the fly likes Help with class for a script object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Help with class for a script object" Watch "Help with class for a script object" New topic

Help with class for a script object

Vinicius Souza
Ranch Hand

Joined: May 18, 2011
Posts: 45

Hi! I will try to explain my problem. Im creating a scripting class that expose some functionality of my game to be used on the JavaScript. So I created the following class:

So, in somewhere of my game engine Im creating a instance of this class and adding this instance to the script engine:

When Im on the script I can use this script (its works):

As you can see, the Script Engine cant access a public method called in(), but can access the method showMessage() which is declared on the same class...
I really dont know why its not working....
Help will be very appreciated! Im really stucked on this...

Java is the best (I love C too) heehhh
I agree. Here's the link:
subject: Help with class for a script object
Similar Threads
Java formulas in xml format
Syntax for mapping a var to a method
Using my own types on a Script Engine....
Inheritance confusion
Pre-compiling a script