Cannot use this code: TextFlow.addChild (TextFlow)

HelloW,

with the latest SVN (revision: 8751) I'm not able to use this code (~ 2 weeks ago this code worked perfectly):

tf_history = new TextFlow ();

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

It comes to flashlog.txt:

ArgumentError: "newelement" not of a type that this can be the parent of
to flashx.textLayout.elements::FlowGroupElement/replaceChildren() [/ home/dev/flash/trunk/fram .as:729 eoeuvres/projects/textLayout/textLayout_core/src/flashx/textLayout/elements/FlowGroupElement]
to flashx.textLayout.elements::FlowGroupElement/addChild() [/ home/dev/flash/tronc/cadres/projects/textLayout/textLayout_core/src/flashx/textLayout/elements/FlowGroupElement.as:835]

Hello

It's intentional. TextFlow instances cannot be nested (the previous behavior was a bug). If you are looking for the feature "append", you need to add the children of tf to tf_history.

Abhishek

(Adobe Systems Inc.)

Tags: Adobe Open Source

Similar Questions

Maybe you are looking for