Yes, and further, all data service calls in Flex are asynchronous.  You
can neveer access the rsult in the same funtion in which you invoke
send(), but must either bind (I don't because it is hard to debug), or
use a result handler.

 

If you need to be able to identify which result is associated with which
call, look into the ACT pattern, which uses the AsyncToken.  You can
even pass a handler directly to the result (I think this is called
something like "closure").

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Hastings
Sent: Sunday, November 26, 2006 8:53 AM
To: [email protected]
Subject: Re: [flexcoders] How to know when all data has been returned
from a Remote Object Call?

 

On 11/26/06, jroblang <[EMAIL PROTECTED]
<mailto:rob.langston%40sbcglobal.net> > wrote:
> I have a situation where I need to make calls to two different remote
objects (ColdFusion
> queries) where one query depends on the results of the other. Call 1
needs to be
> completed before Call 2 can execute. How do you figure out when Call 1
has retrieved all
> its data, so that Call 2 can be processed? Is some sort of event
dispatched? I've tried

put call 2 in call 1's event handler.

<mx:method name="call1" result="handeCall1(event);"/>

 

Reply via email to