I think the simplest way would be to put the System.out.println call inside of the onSuccess or onFailure methods.
Happy coding, Jeff On Sun, Sep 13, 2009 at 2:52 PM, Angel <[email protected]> wrote: > > I have this code, which sends a call to the server. This call takes a > few seconds to complete. > I should not run System.out.println until the call ends. > > > I do this? How I wait for the server? > thanks > > [CODE] > String value="nothing"; > BDServiceAsync service = GWT.create(BDService.class); > service.myCall("text", new AsyncCallback<Map<String,String>>(){ > > public void onFailure(Throwable caught) { > > } > > public void onSuccess(Map<String,String> result) { > // This takes a few seconds to complete. > value="hola"; > > > } > }); > > // should wait for the call to the server > System.out.println("value="+value); > > [/CODE] > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" 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-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
