1 Reply Latest reply on Dec 5, 2008 8:12 AM by Ansury

    Code Help


      Please review my code below. What is happening is when the String comes into the function (from the datagird) 'setStoreId' the 'dataGridHandler' function runs at the same time. However this isn;t what is required I need to set the string before, and then run the 'dataGridHandler'.

      How do I get around this problem? Thanks

      public function setStoreId(str:String):void

      public function dataGridHandler(str:String):void
      storeID = str;

      <mx:DataGrid id="whatInData" x="0" y="0" width="95%" height="339" itemClick="setStoreId(whatInData.selectedItem.id)">
        • 1. Re: Code Help
          Ansury Level 3
          They can't run at the *same* time. ^_^ Maybe you mean during the same "screen refresh" (callLater() is typically the answer to those issues)? But I think you need to provide a little more clarification, I'm not really sure what your problem is.