DataChangeListener not firing on first change event

42 views
Skip to first unread message

Nathaniel Johnson

unread,
Oct 15, 2013, 6:52:29 AM10/15/13
to codenameone...@googlegroups.com

Given the following code and running in it the simulator with "Native Input" on

        TextField tb = new TextField();
        tb.addDataChangeListener(new DataChangedListener() {
            public void dataChanged(int type, int index) {
                Dialog.show("Change", "Changed to: " +tb.getText(), "OK", "Cancel");
                Log.p(tb.getText());
            }
        });

The listener does not fire  when the field enters the native mode on the first keypress.  It then fires correctly with each additional keypress.  If I disable native input then it works fine.  Is this expected behavior?

Nathaniel Johnson

unread,
Oct 15, 2013, 6:56:14 AM10/15/13
to codenameone...@googlegroups.com
I should add that I don't actually define the tb i that method. I just put it in for clarity it is actually defined as an object attribute.


--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/ik5XB3Ijajs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/f41b1102-18da-44ce-a713-6825410e8036%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Shai Almog

unread,
Oct 15, 2013, 2:28:39 PM10/15/13
to codenameone...@googlegroups.com
Is this something you see on the device or only on the simulator?
We were a bit lazy on fixing simulator only issues.

Nathaniel Johnson

unread,
Oct 15, 2013, 2:47:46 PM10/15/13
to codenameone...@googlegroups.com
This is strictly simulator- I haven't made it to device testing yet.  It might be worth mentioning it is Ubuntu 13.04 running Oracle JDK 7 via Netbeans 7.4 RC2.


On Tue, Oct 15, 2013 at 1:28 PM, Shai Almog <shai....@gmail.com> wrote:
Is this something you see on the device or only on the simulator?
We were a bit lazy on fixing simulator only issues.

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/ik5XB3Ijajs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.

Shai Almog

unread,
Oct 16, 2013, 1:54:12 AM10/16/13
to codenameone...@googlegroups.com
OK, I'll fix that for the next update.
Reply all
Reply to author
Forward
0 new messages