I have been reading through the tutorial, and I saw a piece of code that can be simplified. In "Step 4: Managing Events on the Client" (http://code.google.com/webtoolkit/tutorials/1.6/ manageevents.html), the code sample in the third section (Responding to user events) is as follows:
private void addStock() { final String symbol = newSymbolTextBox.getText().toUpperCase().trim (); if (!symbol.matches("^[0-9a-zA-Z\\.]{1,10}$")) { Window.alert("'" + symbol + "' is not a valid symbol."); newSymbolTextBox.selectAll(); return; } // ... } The first line of code gets an upper-case string, but the second line checks for both capital and small letters. The check for small letters is clearly not useful. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---