bound controls and tlf
I've seen it mentioned (and confirmed it) that there are two ways to bind
a textarea control - the text property and the textFlow property. What are
the advantages and disadvantages of each?
I have a long TextFlow (a document) that is built up from pages. It
duplicates the structure of an existing printed book. Each page is
a file. I constuct the TextFlow by reading the pages, creating a Div
with a Paragraph with a Span, assigning the file text to the Span
and the Paragraph to the Div, and then adding the Divs one by one
to the TextFlow.
I want to be able to edit each page (Div) in a textarea. The proper
mapping unit is a Div; but the Div's textFlow property appears to
be the entire TextFlow, not some sub-TextFlow equal to the Div.
But the Div has no text property - there's only the getText method
- the Div provides no bindable hook.
If I write my own text() setter, when will it be called? If I need to
hook the textarea up to another Div (another page), how will I know
if I've edited the textarea but the setter hasn't been called yet?
I've tested doing that, but the setter seems never to happen.
Do I need to hook in to the Change() event on the textarea
manually? If so, what's the point of binding?
FInally, I'll know all this is working when I can make editing
changes to the active Div/Paragraph/Span, which cause the
length of the page text to change; and the changed length
has rippled though to change the absolute start position of
all the following pages. When does that happen, and do I
need to trigger it somehow?
