On Jun 16, 1:09 pm, Magnus <alpineblas...@googlemail.com> wrote:
> Hi,
>
> because I cannot access a variable in the enclosing block from within
> an AsyncCallback method I found the following workaround with a class
> global variable, which I find very unpretty. How can one do this
> better?

What is it that you don't understand in "asynchronous"?

I mean, your getUsr call will *always* end after the "return
tmp_str_usr" statement. So, on the first call and until the server
responds and you AsyncCallback is called, you'll get the empty string
(initial value of the field); then AsyncCallback will change its
value, and on all subsequent calls until the server responds to the
new requests (and AsyncCallback will be called again) you'll get that
value.

When you ask your wife to get you some beer, the beer won't be there
until your wife come back from the kitchen; and while she's gone, the
football match isn't paused and life continues.

-- 
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-tool...@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.

Reply via email to