Re: Problem with Asynchronous callback

2010-03-29 Thread Sripathi Krishnan
Andrea, You must read the great beer analogy out here - http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/faca1575f306ba0f?pli=1 --Sri On 29 March 2010 22:47, kozura wrote: > Sync version: > List getLatLngs(List addresses); > > Async version: > void getLatLngs(List addres

Re: Problem with Asynchronous callback

2010-03-29 Thread kozura
Sync version: List getLatLngs(List addresses); Async version: void getLatLngs(List addresses, AsyncCallback> cb); onSuccess(List result) { listaCoordinateCittaUtente = result; doStuffWithResults...; } -- You received this message because you are subscribed to the Google Groups "Google

Re: Problem with Asynchronous callback

2010-03-29 Thread Andrea
Thanks for your answer. It's only few days that I use this technology so please tell me how I can make my RPC call takes the entire list at once. I can't understand the first solution, can you give me an example of it?? Andrea On 29 Mar, 17:54, kozura wrote: > Hi Andrea, > I assume you mean the

Re: Problem with Asynchronous callback

2010-03-29 Thread kozura
Hi Andrea, I assume you mean the listaCoordinateCittaUtente list doesn't have any data after this call? This is the point of an asynchronous call, you can't predict how long the call will take to come back from the server, so you actually need to design your app to use the data only once it is com

Re: Problem with Asynchronous callback

2010-03-29 Thread Eric Ayers
I think you can trace what's going on by putting in a few calls to Window.alert(). The calls to getLatLng() have to go across to Google's servers and may take many milliseconds to return. You need some kind of mechanism to make sure all of the LatLngCallbacks fire before looking at listaCoordinat

Problem with Asynchronous callback

2010-03-29 Thread Andrea
I have the method getAddress() that take in input an array of cities. For each city I use the Asyncronous method getLatLng() that return me the coordinates and I save them in an ArrayList called listaCoordinateCittaUtente. But when I use the ArrayList after the call of the method getAddress() it is