Skip to main content
Participant
September 5, 2011
Question

Extensability improvement in createTextFlowFromXML

  • September 5, 2011
  • 2 replies
  • 563 views

Hey TLF team,

In TextLayoutImport.createTextFlowFromXML, there is a second argument 'textFlow' which is only ever called from BaseTextLayoutImporter with a value of null.

I guess the point of this is to allow a subclass of TextFlow to be passed in as an alternative to having createTextFlowFromXML create a TextFlow on its own (e.g. var element:FlowElement = super.createTextFlowFromXML(xmlToParse, new MySubClassedTextFlow()); )

but if this is that case then the first line needs to be changed from:

var newFlow:TextFlow = null;

to

var newFlow:TextFlow = textFlow;

This would allow custom importers to subclass TextFlow, but still be able to use the TLF importer framework.

Do you agree, and if so can this change be made on the trunk?

This topic has been closed for replies.

2 replies

Adobe Employee
September 7, 2011

Looks like the original intent was to allow importing into an existing text flow, replacing (or appending) the current contents. But it also looks like this was never implemented.

To implement it, it's a must to replace all content from the text flow passed in, not just change the first line.

Participant
September 6, 2011

I would find this useful too. TLF is requiring a lot of customisations...

Thanks