1 Reply Latest reply on May 27, 2009 8:47 AM by Steve L Walker

    how do I wait until the workbench process is finished?

    zubinshi

      Hello,

       

      I had call a process in my flex application? I was wondering how can wait unit the process is finished?

       

      for example, I have following code in a class called loadMember:

       

      private var loadMemberById:RemoteObject = new RemoteObject(PROCESS_LOAD_MEMBER);;

       

      private var memberId:String;

       

      public function LoadMemberManager(id:String)

      {

      this.memberId = id;

      loadMemberById.channelSet = ChannelSetHelper.getRemoteObjectInstance().channelSet;

      loadMemberById.addEventListener(ResultEvent.RESULT,handleResult);

      }

       

       

      public function load():void

      {

      var params:Object=new Object();

      params[MEMBER_ID]=memberId;

      loadMemberById.invoke(params);

      }

       

      // This method handles a successful conversion invocation

      private function handleResult(event:ResultEvent):void

      {

      //Retrieve information returned from the service invocation

      var res:Object=event.result;

      var member:MemberDTO=res[MEMBER] as MemberDTO;

      }

       

       

      in a method of another class, I do following

       

      var load:loadMember=new loadMember(memberName);

      load.load();

      //do something here

       

       

       

       

      How can I wait load.load() to finished until do something?

       

      Thanks,