On Fri, Aug 5, 2011 at 12:15 PM, Jens <[email protected]> wrote:

> You can assign your response to an instance variable, you just can not
> write this.variable inside onSuccess because that references the Receiver
> and not the real class that contains the async call. Just omit "this" and it
> should work.


Yep, that's basically what I've done too but I could not imagine assigning a
value to a (global) field could be advisable.


> If you want to be complete you could write it the long way
> "RealClass.this.variablename". I do this all the time in my async callbacks.
> But its only useful if you want to remember some information obtained by an
> async call.


That's almost always the case.


> If you really need to process the response you have to do it in the
> onSuccess method either directly or by calling a separate method (or by
> firing an event which is basically the same as calling a separate method).


So If I have a callback that requires a value from another callback, I have
to chain these callbacks? Could result in a pretty long callback chain...

-Alex

-- 
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