Hi all,

I am trying to follow tutorial in writing StockWatcher app with GWT
but I get some errors;

in addStock() method:

private void addStock() {

        final String symbol = newSymbolTextBox.getText().toUpperCase
().trim();
        newSymbolTextBox.setFocus(true);

        if (!symbol.matches("^[0-9A-Z\\.]{1,10}$")) {
                Window.alert("'" + symbol + "' is not a valid symbol.");
                newSymbolTextBox.selectAll();
                return;
        }

        newSymbolTextBox.setText("");

    }

I can not understand where the error is;
I even tried to copy&paste from gwt web site.
The error I get is:

[ERROR] Line 68: Syntax error on token "void", @ expected
[ERROR] Line 68: addStock cannot be resolved to a type

Then, I also get error related to addStock() method:

[ERROR] Line 56: The method addStock() is undefined for the type new
ClickHandler(){}
[ERROR] Line 63: The method addStock() is undefined for the type new
KeyPressHandler(){}

Can anyone help me?

Bye,
Marco

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to