private var list1Result:ResultEvent;
private var list2Result:ResultEvent;

private function handleList1Result(event:ResultEvent):void
{
  list1Result = event;
  if(list2Result)
  {
    handleResults(list1Result, list2Result);
  }
}

private function handleList2Result(event:ResultEvent):void
{
  list2Result = event;
  if(list1Result)
  {
    handleResults(list1Result, list2Result);
  }
}

private function handleResults(result1:ResultEvent,
result2:ResultEvent):void
{
  //your code here
}

On Thu, Aug 20, 2009 at 8:35 PM, coder3 <rrhu...@hotmail.com> wrote:

>
> Hi
>
> my application needs to wait until two (or more) resultHandlers to get
> their
> results and use them together.
>
> for example,
>
> <mx:RemoteObject id="myRO" destination="test" fault="FaultHandler(event)">
>        <mx:method name="getList1"  result="handleList1Result(event)"/>
>        <mx:method name="getList2"  result="handleList2Result(event)"/>
> </mx:RemoteObject>
>
> at application creationComplete, it calles myRO.getList1() and
> myRO.getList2()
>
> what can i do to make sure i get both results before i do anything else?
>
> i know it can call myRO.getList1(), then in the
> handleList1Result(event:ResultEvent), after it gets the list1 result, then
> it calls myRO.getList2(),
>
> but i would like to know a better, more clear way.
>
> thanks
>
> C
>
> --
> View this message in context:
> http://www.nabble.com/how-to-wait-for-more-than-one-httpserivice-remoteobject-result-to-finish--tp25067471p25067471.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>
>
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Alternative FAQ location:
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> Links
>
>
>
>

Reply via email to