background: there is a variable : " NpTextBox createTxt " there is a button, by default thisButton.setEnabled(false).
what logic I want : when user put something into createTxt. I will " thisButton.setEnabled(true)." user may type or middle click the mouse to paste something into createTxt. my question is : what event type I should handle to implement my logic especially when user middle click mouse : I do some test as below : I add 4 handlers of 'Click', 'MouseDown', 'MouseUp', and 'MouseOver' event . I add System.out.println(). on some lines for test and got below output .(because eclipse beakpoints on these lines in GWT debug mode not always work.) I copy a string "projectname" then I move my mouse to the createTxt on the Web UI page and click middle button of mouse twice and find output as below . ... -----------MouseOver-------------- ----------createTxt.getAbsoluteLeft(): [0]------------- ----------createTxt.getValue(): []------------- ----------createTxt.getText(): []------------- -----------MouseDown-------------- ----------createTxt.getAbsoluteLeft(): [0]------------- ----------createTxt.getValue(): []------------- ----------createTxt.getText(): []------------- -----------MouseUp-------------- ----------createTxt.getAbsoluteLeft(): [0]------------- ----------createTxt.getValue(): []------------- ----------createTxt.getText(): []------------- -----------MouseClick-------------- ----------createTxt.getAbsoluteLeft(): [0]------------- ----------createTxt.getValue(): []------------- ----------createTxt.getText(): []------------- [ reminder : here is the place that fist click is done ] -----------MouseDown-------------- ----------createTxt.getAbsoluteLeft(): [22]------------- ----------createTxt.getValue(): [projectnameprojectname]------------- ----------createTxt.getText(): [projectnameprojectname]------------- -----------MouseUp-------------- ----------createTxt.getAbsoluteLeft(): [22]------------- ----------createTxt.getValue(): [projectnameprojectname]------------- ----------createTxt.getText(): [projectnameprojectname]------------- -----------MouseClick-------------- ----------createTxt.getAbsoluteLeft(): [22]------------- ----------createTxt.getValue(): [projectnameprojectname]------------- ----------createTxt.getText(): [projectnameprojectname]------------- .... we can see after first click on mouse middle button the createTxt.getText() will return empty string. Gwt from the second click it will work. seems the 'Click', 'MouseDown', 'MouseUp', and 'MouseOver' events are handler before GWT set value to ' createTxt' . question 1> : which even should I monitor and which handler should I add to createTxt so that I can catch the content after the first click here ? question 2> if user right click mouse , OS (here I use Ubuntu) will feedback a menu with a option 'paste' , now if user click this option . GWT Web UI can not catch this click event, but this event can be catch by OS. I do not know if we should catch this event. and take different browser , OS ...into account. so I want to know if we must have this function . or can we do this in the same way of "Create Branch" --The button is never disabled and the string checking can be done on button click event. I think it will be much easier than make a check for all the events. I am not clear the background about why we need disabling the button . I think handling all this events is not necessary except that you really expect to this way. thanks in advance!! //Bruce -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.