7 Replies Latest reply: Aug 15, 2012 1:49 PM by pauland RSS

    Synchronous calls

    Zolotoj Community Member

      I have a class B that is based on another class A.

      Base class A has method initialize that is overridden like this in class B:

      public override function initialize():void

      {

                                    super.initialize();

      setupControls();

      }

      base class A initilize

      public function initialize():void

      {

           // call to server to check session time out.

           callToServer(callfunction, onResult);

      }

      private function onResult ...

      {

      }

       

      What happens is that  setupControls(); will run not waiting on onResult  to execute.

      Any chance to control this: to wait for results of callToServer to arrive?

       

      Thanks