Skip to main content
Participant
July 23, 2009
Answered

Cant use this code: TextFlow.addChild (TextFlow)

  • July 23, 2009
  • 1 reply
  • 1034 views

Hellow,

with the latest SVN version (Revision: 8751) i'm not able to use this code (about ~2 weeks ago this code worked perfectly):

        tf_history = new TextFlow ();

        public function text_add (txt: String): void {
            var tf: TextFlow = TextConverter.importToFlow (txt, TextConverter.PLAIN_TEXT_FORMAT);
            tf_history.addChild (tf);
            tf_history.flowComposer.updateAllControllers ();
        }

this is from flashlog.txt:

ArgumentError: newElement not of a type that this can be parent of
    at flashx.textLayout.elements::FlowGroupElement/replaceChildren()[/home/dev/flash/trunk/frameworks/projects/textLayout/textLayout_core/src/flashx/textLayout/elements/FlowGroupElement.as:729]
    at flashx.textLayout.elements::FlowGroupElement/addChild()[/home/dev/flash/trunk/frameworks/projects/textLayout/textLayout_core/src/flashx/textLayout/elements/FlowGroupElement.as:835]

This topic has been closed for replies.
Correct answer Abhi.G.

Hi,

That is intentional. TextFlow instances can't be nested (the previous behavior was a bug). If you are looking for 'append' functionality, you'll have to add the children of tf to tf_history.

Abhishek

(Adobe Systems Inc.)

1 reply

Abhi.G.Correct answer
Participating Frequently
July 23, 2009

Hi,

That is intentional. TextFlow instances can't be nested (the previous behavior was a bug). If you are looking for 'append' functionality, you'll have to add the children of tf to tf_history.

Abhishek

(Adobe Systems Inc.)