7 Replies Latest reply: Oct 18, 2013 3:07 AM by igor_rik RSS

    textFlow (RichEditableText) not updating properly


      hi all,


      i have a number of cases where trying to update texts, usually on RichEditableText objects generated in actionscript, does not show up or shows up in a weird way.


      example 1:

      RichEditableText component already declared in MXML. simplifying, when i use something like:

      var myTextFlow:TextFlow = TextConverter.importToFlow(strToFormat, TextConverter.TEXT_FIELD_HTML_FORMAT);

      questionText.textFlow = myTextFlow;  // questionText is a RichEditableText declared in MXML


      sometimes it shows well but most times it is a mixture of 1-2 lines from the new text + 1-2 lines from the text which was there earlier. this is not due to wrong assignment into vars but maybe i need to initialize or refresh the component? is there a refresh function??


      example 2:

      i have 2 seperate bunches of RichEditableText components, created in actionscript with formatting and data for each (along with wrapping VGroups and HGroups).

      the 2 are each associated to a different State and, as far as i know, should appear/disappear according to the current State.

      however, if "bunch 1" appears and then i switch state to see "bunch 2" instead -- the window is empty - as if no text exists in the RichEditableTextobjects.

      and also vice versa - if i first look at "bunch 2" it appears well, but when trying to switch State and see "bunch 1" instead -- the window again becomes empty of text (although it appeared well in the previous scenario going to "bunch 1" first).

      am i missing a refresh of some sort???