Calling methods with arguments


when I call methods without arguments from a button, it works fine, but once I add an argument to it, like:


public void choose(){}




public void choose(int index){}



[xml]<interact onClick=“choose()”/>[/xml]


[xml]<interact onClick=“choose(0)”/>[/xml]

It doesn’t work anymore and I get

30.03.2011 18:17:03 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: java.lang.Thread run (

Can’t I pass arguments like this? Also is it somehow possible to get a panel in my ScreenController class and modify its attributes?

/edit: Solved question 2.

you can only use String arguments for this because Nifty doesn’t really know if you mean (String) “0” or (int) 0 or (float) 0.f

so it’s always passed as a String parameter.