I think KeyPressed events will be fired before the actual content of your 
textarea is updated by the browser. So in your validate method 
textarea.getText() will give you the old value without the newly typed 
character. This newly typed character can be obtained by the 
KeyPressEvent.getCharCode() method (or getUnicodeCharCode()). If you append 
it to textarea.getText() it should work.

You could also use key up events. These should be fired after the textarea 
is updated and textarea.getText() should return the new text.

-- 
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.

Reply via email to