Skip to main content
May 26, 2011 6:19 AM UTC
Answered

TLF Tabstops and textflow deep copy

Hi,

I had a requirement where I had to make a deep copy of a textflow,I was under an impression that it would make a copy of this textflow.

Yes,it did make a copy of the textflow a new instance but the paragraph elements under this textflow were referencing to the same tabstop arrays which the original textflow was referencing.

Now is this a bug or is it supposed to be like this only.

-Ashar

This topic is closed to new replies. Start a new post to keep the conversation going.
Jin-HuangCorrect answer
Adobe Employee
May 27, 2011 6:10 AM UTC

It is to save memory. 

The TabStops array and the actual TabStop object instances that are members of the array should be treated as read-only in the below cases.

1) once it is set into a TextLayoutFormat

2) when it is read from a TextLayoutFormat

3) when it is read from an implementer of ITextLayoutFormat

2 replies

Jin-HuangCorrect answer
Adobe Employee
May 27, 2011 6:10 AM UTC

It is to save memory. 

The TabStops array and the actual TabStop object instances that are members of the array should be treated as read-only in the below cases.

1) once it is set into a TextLayoutFormat

2) when it is read from a TextLayoutFormat

3) when it is read from an implementer of ITextLayoutFormat

Translate
May 27, 2011 9:09 AM UTC

So, in my case I will have to use the utility of copying the TabStops array and the new (copied) textflow should reference it instead of the actual arrays.

Translate