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

83 views
Skip to first unread message

evanite

unread,
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");
startGame();
}
});

From version 1.5 on it isn't recommended to use HTTPRequest.asynGet()
anymore, but to use the RequestBuilder class in the
com.google.gwt.http.client 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?

Cheers
Alexander

hoogle

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

http://groups.google.com/group/gwtapps/files

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

Reply all
Reply to author
Forward
0 new messages