How to update text of ${CALL.getSomething()}

Hi,

nifty GUI enables the GUI to pull information from my javacode via the use of ${CALL.getSomething()} .

But it only calls this method onces and then stays in this state. How can i make nifty GUI to pull new information from the method?

let to simplicity assume if have the following method:

[java]
public int getSomething() {
return new Date().getSeconds();
}
[/java]

How do i ensure that the displayed value is up to date the whole time?

I dont want my java code to push the information into the gui, but want the GUI to pull the information from java.
Is there something like the observer pattern for nifty gui or a simple method call to enforce the update?

Greetings,
Glut

I don’t believe so. Your best bet, is to just push it to the gui in the update loop

You can always make your ScreenController an AppState and then push the change in the update() method of the AppState.

I do this already, but i want to pull the information and not push it, since i don’t want my java-code to know the GUI.xmls, but want to know my GUI.xmls the java code instead.

Sorry, it doesn’t work that way.