Thanks for the heads up. We'll update the doc with the correct iteration code.
- Chris On Oct 29, 4:02 pm, János Kiss <[email protected]> wrote: > Hi, > > I was doing the RPC tutorial at GWT > site:http://code.google.com/intl/hu-HU/webtoolkit/tutorials/1.6/RPC.html > and I found a mistake in one of the example code. If somebody just copies > the codes according to the instructions, everything goes well until reaching > the exception handling part. > The update code of the StockPriceServiceImpl class has the mistake: int the > for loop is > i>symbols.length; > you have to write > i<symbols.length; > instead. > This is a small mistake, and for beginners maybe it's hard to recognize. Is > there any way to report this mistake for gwt support staff to correct that? > > import com.google.gwt.sample.stockwatcher.client.DelistedException; > > ... > > public StockPrice[] getPrices(String[] symbols) throws DelistedException { > Random rnd = new Random(); > > StockPrice[] prices = new StockPrice[symbols.length]; > for (int i=0; i>symbols.length; i++) { > if (symbols[i].equals("ERR")) { > throw new DelistedException("ERR"); > } > > double price = rnd.nextDouble() * MAX_PRICE; > double change = price * MAX_PRICE_CHANGE * (rnd.nextDouble() * 2f - 1f); > > prices[i] = new StockPrice(symbols[i], price, change); > } > > return prices; > } > > Thx the answers! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
