Data changed is invoked as you type in the simulator too. Not sure what
you're seeing here...
On Monday, January 4, 2021 at 1:22:39 PM UTC+2 P5music wrote:
> 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
>
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/a847367b-64bb-4e29-ad89-c673d6917000n%40googlegroups.com.