Problems calling a method on the controller from outside the controller


I have the following method:


public void receivedText(String text, NiftyImage icon) {


logger.debug("adding message " + chatLineCounter + " to screen");

CustomControlCreator createChatLine = new CustomControlCreator("chat-line-" + chatLineCounter,


createChatLine.create(nifty, screen, element.findElementByName("chat-panel"));

Element el = element.findElementByName("chat-line-" + chatLineCounter);



element.getParent().setLayoutManager(new VerticalLayout());




with this method I add lines to a scollable panel. When I call this method from another method in the same controller, everything works like a charm. When I call it from outside the controller, Nifty just hangs after exiting this method.

Any ideas? Am I doing something wrong here?

NM. It’s an error somewhere else. Somewhere in my own code, which I can’t figure out (yet).

ah, found it…

Forgot to call a method on my listener which the other class was waiting on. This caused a timeour which crashed my game…