PDA

View Full Version : [FIXED] MessageBox addListener



gslender
10 Sep 2008, 4:18 AM
MessageBox addListener does not add listener to the dialog in a similar way to MessageBox.addCallback, which means listeners cannot be added to a MessageBox.prompt (as it has to be set after dialog render)

The required changes below in MessageBox fix the problem (and ensure both addListener / addCallback have the same behaviour)


public void addListener(int event, Listener listener) {
if (dialog == null) {
if (listeners == null) listeners = new HashMap<Integer, Listener>();
listeners.put(event, listener);
} else {
dialog.addListener(event, listener);
}
}

darrellmeyer
11 Sep 2008, 7:17 AM
Fixed in SVN.