That makes sense if you can control the data that is sent back to you from the 
first resultevent (but I can't).

1) Web call - Does the user 'Trefalgar' exist?
2) Web reply - No. (no additional data)
3) Web call - Create user 'Trefalgar'

Flex doesnt appear to be linear. That said, since #2 doesn't tell me what user 
it's replying "no" to, if I do this in a loop with 100 users, it could be 
replying back with 20 "no"s and I can't tell how I'd match the replies up with 
the requests.

Is there a solution for this problem in Flex/AS? I don't think putting the 
secondary calls in the resultevent would work, when critical information needed 
for future calls isn't available in the resultevent.

Tref


--- In [email protected], "valdhor" <valdhorli...@...> wrote:
>
> Basically you wait for the resultevent of the first call and put the second 
> call in that function.
> 
> --- In [email protected], "trefalgar" <trefalgar@> wrote:
> >
> > I've run into an odd problem that I haven't been able to find a solution 
> > to. In other programming languages (Perl, PHP, for example), if I want to 
> > do X, Y and Z in order, all with remote calls, it's very easy and straight 
> > forward. With Flex, I'm pretty confused on how to do something this simple. 
> > Here's the problem and why I'm confused ...
> > 
> > I'm using Flex and SOAP to talk to a web interface. In order to get to step 
> > Y, I have to first do step X. I can not skip to step Y without step X being 
> > complete. But setting up the flow to be two subroutine calls, X first, then 
> > Y, doesn't mean that X finishes first (and lately means Y actually finishes 
> > first).
> > 
> > callX(var1,var2);
> > callY(var3,var4);
> > 
> > Since Flex uses listeners, and not return() how do you pass data around to 
> > know that X is complete? 
> > 
> > callX(var1,var2);
> > {wait for callX to be finished, before continuing}
> > callY(var3,var4);
> > 
> > How do you pass data around successfully to do that check? Does my problem 
> > description make any sense or is my brain fried? ;)
> > 
> > Treffy.
> >
>


Reply via email to