HTTPRequest deprecated in GWT 1.6 - but how to use RequestBuilder in Hangman example?

Skip to first unread message


Jul 3, 2009, 2:13:04 PM7/3/09
to Google Web Toolkit Applications
Hi GTW Apps forum,

in the book's Hangman example there is following snippet of code, that
is used to load the movies.txt file, and when done, start the game:

//load words
HTTPRequest.asyncGet("movies.txt", new ResponseTextHandler(){
public void onCompletion(String responseText) {
words = responseText.split("\n");

From version 1.5 on it isn't recommended to use HTTPRequest.asynGet()
anymore, but to use the RequestBuilder class in the package instead. I tried to work with it,
but just didn't make it to replace the existing code with it.

My Java surely is a bit rusty (I coded .NET for some time now), but
really want to come back in order to use the fine GWT (which I came
across some weeks before) in future.

Are there any coding geeks out there that can supply some smart code
that replaces the snippet above?



Jul 12, 2009, 5:10:17 AM7/12/09
to Google Web Toolkit Applications
Alexander have a look at the updated sources at:

There is hangman source code for GWT 1.5, which uses the
RequestBuilder class.

Reply all
Reply to author
0 new messages