My CodenameOne app features a container for editing. It contains some TextFields, Buttons and other components.
I need to know when the text has changed inside a TextField, but I see that the listener is called only after another component has been focused.
editText.addDataChangedListener(new DataChangedListener() {
@Override
public void dataChanged(int type, int index) {
setEdited();
}
});
This method is called
public void setEdited()
{
// System.out.println("edited"); event not fired
System.out.println("edited"); event fired
...
...
}
In the method you can see that a logging instruction is present.
If it is present the event is fired.
If it is commented the event is not fired.
Is this a behaviour that will be found also on devices?
Or it is just one of simulator's whims?
Thanks in advance