Nifty – text injection doesn't work

It shows exactly what is written in *.xml file [ ${CALL.getPlayerCapacity()} / ${CALL.getPlayerMaxCapacity()} ], not the String I wanted to get.

http://pastebin.com/ZC5SPnkk

[java]
public class GameGUI implements ScreenController
{
//…
String playerCapacity,
playerMaxCapacity;

public void Update(Main app)
{
    playerCapacity = Double.toString(app.player.getCap());
    playerMaxCapacity = Double.toString(app.player.getCapMax());
}

public String getPlayerCapacity()
{
    return playerCapacity;
}

public String getPlayerMaxCapacity()
{
    return playerMaxCapacity;
}

//-------
public void bind(Nifty nifty, Screen screen) {
System.out.println("bind( " + screen.getScreenId() + “)”);
}

public void onStartScreen() {
    System.out.println("onStartScreen");
}

public void onEndScreen() {
    System.out.println("onEndScreen");
}

public void quit(){
    nifty.gotoScreen("end");
}

}
[/java]

Is this way deprecated or am I doing something wrong?

Do you get the system.out output from the binding method? If not, it means the controller isn’t used.
If you do get that output, then maybe try with one call (instead of 2) and see if that works.

I have successfully used CALL a couple months ago so I doubt it is deprecated.

Yeah, ive used it fine too. Are there any errors logged from nifty?

This is what I get from logger:

And this is full *.xml file:
http://pastebin.com/wHUQyLXK

Maybe I am adding the controller wrong way?
( controller=“NeomexGame.GUI.GameGUI” )

What’s your controllers full class and package name? That string certainly doesnt look like a standard (i.e. following the java style conventions) package name.

@zarch said: What's your controllers full class and package name? That string certainly doesnt look like a standard (i.e. following the java style conventions) package name.

Yeah, I’m coming from C++ and C# and kinda still keeping its style. Do you think it might be the problem?

package
NeomexGame.GUI
Java file and class
GameGUI

No, your definition looks ok. The most common cause for this sort of thing though is a mismatch in configuration which means nifty isnt actually picking up the controller you think it is.

Incidentally unlike C++ 99% of java programmers follow the same style guides, it makes reading and working with other people’s code much easier.

http://www.oracle.com/technetwork/java/codeconv-138413.html