It's working now! Thank you very much

On 9 Jun., 14:36, Stefan Bachert <stefanbach...@yahoo.de> wrote:
> Hi,
>
> GUIs are asynchronously. You still think synchronously. No change to
> succeed synchronously.
> Your GUI continue to run while your service is send.
>
> Remove the return int.
> Put Code to continue with in onSuccess
>
> Stefan Bacherthttp://gwtworld.de
>
> On Jun 8, 3:07 pm, uwi_u <uwe.chris...@gad.de> wrote:
>
> > Hi there,
>
> > I'm currently writing an Application with GWT, and am Stuck at one
> > position:
>
> > When I call my RPC, the value which is to be returned, will be passed
> > to an global variable. Unfortunately, the returning of this global
> > variable out of the method happens before the onSuccess comes
> > back.....
>
> > the only way to block which I see is to do a while until "
> > loginFeedback < 0"
>
> > Heres some Code (loginFeedback shall get a value from 0 to 2):
>
> > public int loginUser(String user, String passwd, boolean override){
> >           loginFeedback = -1;
> >           XGENgwt.loginUser(user, passwd, override, new AsyncCallback(){
> >                 public void onSuccess(Object result){
> >                   loginFeedback = Integer.parseInt(result.toString());
> >                 }
> >                 public void onFailure (Throwable caught){
> >                   Window.alert("Unable to login: "+caught.toString());
> >                 }
> >           });
> >           logToServer("Bei der Zuweisung: "+loginFeedback);
> >           return loginFeedback;
> >         }
>
> > Is there a better way? I hope so....

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to