Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulator TextField misc bugs #957

Closed
codenameone opened this issue Mar 27, 2015 · 1 comment
Closed

Simulator TextField misc bugs #957

codenameone opened this issue Mar 27, 2015 · 1 comment

Comments

@codenameone
Copy link
Collaborator

Original issue 957 created by codenameone on 2013-11-17T21:13:00.000Z:

Netbeans 7.4
Ubuntu 13.1
Oracle JDK 1.7.0_45-b18

tf = new TextField();
tf.addDataChangeListener(new DataChangedListener() {
    public void dataChanged(int type, int index) {
         Log.p("Data changed:" + tf.getText());
    }
});

When I type "abc" i expect a log to show:
Data changed:a
Data changed:ab
Data changed:abc

Instead I see:
Data changed:Ab
Data changed:Abc
Data changed:Abc

The last log is caused by clicking out of the window and back to Netbeans.

Problems

  1. First keypress does not fire a change event.
  2. First character is being capitalized.
  3. Event is being fired by losing focus.

If I turn off native input and run it in a JFrame

    Display.getInstance().callSerially(new Runnable() {
        @Override
        public void run() {
            tmoi.init(null);
            tmoi.start();
            f.setVisible(true);
        }
    });

With the same input I get:

[EDT] 0:0:0,0 - Data changed:A
[EDT] 0:0:0,1 - Data changed:A
[EDT] 0:0:1,467 - Data changed:AB
[EDT] 0:0:1,467 - Data changed:AB
[EDT] 0:0:2,193 - Data changed:ABC
[EDT] 0:0:2,193 - Data changed:ABC

Problems

  1. All of the letters are uppercase.
  2. The change event fires twice for each key.
@codenameone
Copy link
Collaborator Author

Comment #1 originally posted by codenameone on 2013-11-19T20:37:45.000Z:

This is all fixed in SVN now.
The first issue was already fixed in the latest update.

@codenameone codenameone removed their assignment Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants