What I sometimes do is to provide a callback parameter for methods that do
async requests if I want to be notified once the async request finishes.
So basically:
void executeAllTheseStuff() {
doAsyncStuff(new Callback() {
@Override
public void onSuccess() {
doStuffWhenAsyncIsDone();
}
});
}
void doAsyncStuff(final Callback cb) {
// ...
request.fire(new Receiver() {
public void onSuccess() {
doOtherThings();
if(cb != null) {
cb.onSuccess();
}
}
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/3j-lZwnAXR4J.
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.