1 Reply Latest reply on Sep 23, 2011 10:02 AM by Flex harUI

    Richtext refreshing problem

    Bal_Glen Level 1

      Hi all,

       

      (working with flash builder 4.5)

       

      I have a function in my air-application which catches the event when a file is selected from the filesystem. I have to transform the file which takes a few minutes. No problem transforming, but I would like a simple richtext to display a 'log' to let the user know what is happening.

       

      The problem is: While the function is being executed the richtextfield isn't updated or refreshed. Only at the end you will see the text changes. This way the user doesn't get any information while processing.

      Somehow it seems that the whole function must be executed first before the application get refreshed.

      I tried to work with richTxt.valideNow() and richTxt.validateDisplayList(); but I didn't succeed.

       

      private function _convertFile(event:Event):void {

           richTxt.text = "reading File";

           step1_readFile(_selectedFile);

           richTxt.text = "transforming file";

           step2_transformFile(_selectedFile);

           richTxt.text = "search/replace in file";

           step3_searchReplace(_selectedFile);

           richTxt.text = "file converted";

      }

       

      Any suggestions or solution?

       

      Thanks,

      Glen