CALL.method() does not work when I run the .jar


I’m having a problem with accessing a method from GUI. When I run my program from jMP it can access the method and fills the text correctly. But when I run the same program from the .jar it gives me ${CALL.guiGetUserName()}

the textfield control:

[xml]<control name=“textfield” id=“textUsername” text="${CALL.guiGetUsername()}" align=“center” valign=“center” />[/xml]

I probably should add that the for a button control is working when I run the program from an executable.

So has anyone an Idea what I could be doing wrong?

anything in the log?

is the GUI working correctly at all?

${CALL.method()} will call the method at the ScreenController. So when this doesn’t work in your .jar then there has to be a problem with your ScreenController class but this would mean more things wouldn’t work o_O

I’ve got it, I was reading data from a .xml file in the /asset/interface directory, but when it compiled the directory becomes a .jar so it couldn’t read it anymore… But now I wonder how nifty reads it out? :s

Nifty will try to read files from locations in the classpath or from the filesystem. It will check the classpath first and uses the filesystem second.

You can check out the class which is a class “borrowed” from Slick2d :slight_smile: and it’s original author Kevin Glass.