4 Replies Latest reply on Aug 9, 2009 1:43 PM by ma.tze

    How Do I Use the Data from the CallResponder


      Following some examples, I can successfully populate a data grid with little more than a drag & drop of the data service to the grid. So, it seems that FB has been able to call the php script, get the data, and put it into the data grid.  My problem is that I don't know how to access that same data for uses outside the grid (I want to go through the data with a for-next loop and plot items on a map).


      Here's what I have so far:



      PHP Service selects the data and then creates an array of objects:


      $rows = array();
        while ($row = mysqli_fetch_object($result))
        $rows[] = $row;

        return $rows;



      In the scripts section FB generated:


      protected function dataGrid_creationCompleteHandler(event:FlexEvent):void




      getClubsResult.token = retrieveData.getClubs();






      FB also generated:



      <s:CallResponder id="getClubsResult"/>

      <retrievedata:RetrieveData id="retrieveData" destination="getData" endpoint="http://localhost/Dances-debug/gateway.php" fault="Alert.show(event.fault.faultString)" showBusyCursor="true" source="getData"/>






      The data grid has this in it:




      x="155" y="91" id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{getClubsResult.lastResult}" editable="true">




      I've fooled around with variations on {getClubsResult.lastResult} and followed roads to a number of other dead-ends with no luck. 


      Appreciate any help.