Check if event.getKeyCode() is between 48 and 57 (0 to 9 inclusive). And do 
the same for the keypad, if necessary.

On Saturday, February 9, 2013 5:43:19 PM UTC+1, membersound wrote:
>
> Hi,
>
> looking at NativeEvent extends JavaScriptObject: how can I detect if the 
> event was a number?
> I tried using Character.isDigit(event.getKeyCode()), but this would give 
> me an error:
> The method isDigit(char) in the type Character is not applicable for the 
> arguments (int)
>
> How could I else detect his?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to