Java script is sigle threaded, you can not use threads in the client side of
gwt project. Just use AcyncCallback.

On Thu, Feb 4, 2010 at 2:18 AM, SergeZ <[email protected]> wrote:

> Hi everybody! I meat the following problem.  When my GWT app is
> started it is very necessary to make an asynchronous call - to gether
> some data.   If i make this call directly from OnModuleLoad() method -
> then i getting the result, but when I putting the call of my method in
> a thread:
>
> OnModuleLoad() {
> .......
>
> Runnable a = new Rannable()
> {
> public void run()
> {
>     RS.rmiService(new AsyncCallback<String>(){
>     public void onFailure(Throwable a)
>    {
>     }
>     public void onSuccess(String result)
>      {
>            Window.alert(result);
>      }
>
> }
>
> }
> };
>
> .....
> }
>
> then I receive NOTHING - there is no any popup window with the result
> of my Async;
>
> So, what I doing wrong ? May be I just not correctly work with threads
> in GWT, or  may be they are not supported in GWT? Please, help me with
> your advice - how can I receive the result of my async method from
> separate thread.
>
> --
> 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]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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