LoL!

I already thought about using flags, but not to call check() for every
function...

Thank you man!

On 17 Nov, 16:56, Ian Bambury <ianbamb...@gmail.com> wrote:
> The problem with that is that you have to wait for call A to return before
> initiating call B. What if you have 5 or 6 calls. Or the user can submit
> different bits as and when?
>
> The best way is to make a single rpc call which does everything you want out
> of A and B when everything is ready.
>
> If there are too many combinations, then send a set of commands.
>
> If you want to/have to do it on the client, then you have to check that
> everything has returned OK and when they have, do that 'some code' stuff
>
> You need to have some way to indicate that each call has returned and each
> return checks if everything is ready. If you are waiting for data, just
> check if the data is there, otherwise use flags. E.g.
>
> boolean aReturned = false;
> boolean bReturned = false;
> boolean cReturned = false;
>
> rpcA()
> {
>    onSuccess()
>    {
>       aReturned=true;
>       check();
>    }
>
> }
>
> rpcB()
> {
>    onSuccess()
>    {
>       bReturned=true;
>       check();
>    }}
>
> rpcC()
> {
>    onSuccess()
>    {
>       cReturned=true;
>       check();
>    }
>
> }
>
> check()
> {
>    if(aReturned && bReturned && cReturned)
>    {
>    // Do stuff with a, b and c
>    }
>
> }
>
> Ian
>
> http://examples.roughian.com
>
> 2009/11/17 olivier nouguier <olivier.nougu...@gmail.com>
>
>
>
> > Hi,
> >  Basically:
> > rpc_funct_A(){
> >  onSuccess(){
> >  rpc_funct_B(){
> >   onSuccess(){

--

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


Reply via email to