5 Replies Latest reply on May 4, 2010 10:53 AM by Scott R. Hamilton

    Statements not executing in sequence, causing problems

    Scott R. Hamilton Level 1

      I am retrieving data from a mySQL database using a function call
      which implements an HTTPService to access the data in the database.


      The statements following the function call, which process the returned

      data structure are executing before the function has finished returning

      the results.  In other words the function call and the statments following

      it are not executing in in sequence.


      How can I force the code following the function call to wait until the
      function has finished before it is executed?


      The HTTP service is returning the mySQL data in a structure named
      An event listener
         http.addEventListener(ResultEvent.RESULT, mysqlResult);
      is used to copy the result into my data provider.


      Is there a way I can tap into this event chain in my application to
      force a wait until the return data structure has been filled?