Several error #1009 occurrences w/ TLFTextField/TLF 2 in CS5.5
I'm currently working on a Flash application which formerly used plain old TextFields and has now been adapted to use TLFTextFields instead.
While I'm generally quite happy with some of the improvements in TLF 2 (lists!), it still seems much buggier than expected from Adobe.
For example, textHeight doesn't always seem to update immediately after setting htmlText, scrollV sometimes returned nonsensical values while scrolling, when re-setting htmlText some formatting (colors, font weight) from the previous value stays around etc. In short, even the new version of TLFTextField seems significantly less robust than TextField (which probably shouldn't come as a surprise, given the complexity of the thing).
While annoying, for most of those issues I was able to find work-arounds. Now, however, we're seeing rather mysterious null-pointer issues popping up.
Maybe those errors ring some bell with you; I'm sorry I can't provide more detailed information yet (I'm getting those reports from testers in the field).
A related question: Is there a 100% reliable way to reset a TLFTextField, so that no internal inconsistencies have any chance of staying around?
---
While querying numLines:
TypeError: Error #1009: Der Zugriff auf eine Eigenschaft oder eine Methode eines null-Objektverweises ist nicht möglich.
at flashx.textLayout.compose::BaseCompose/advanceToComposeStartPosition()
at flashx.textLayout.compose::BaseCompose/composeTextFlow()
at flashx.textLayout.compose::ComposeState/composeTextFlow()
at flashx.textLayout.compose::StandardFlowComposer/http://ns.adobe.com/textLayout/internal/2008::callTheComposer()
at flashx.textLayout.compose::StandardFlowComposer/internalCompose()
at flashx.textLayout.compose::StandardFlowComposer/composeToPosition()
at flashx.textLayout.container::TextContainerManager/http://ns.adobe.com/textLayout/internal/2008::getActualNumLines()
at SingleTextContainerManager/get numLines()[/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRuntime/fl/text/SingleTextContainerManager.as:183]
at fl.text::TLFTextField/get numLines()[/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRuntime/fl/text/TLFTextField.as:3323]
at kp.ui.controls::TextScrollBar/get visibleLines()[/Users/chris/r/2010/09/kp-maintenance-2010-11/flash-5/kp/ui/controls/TextScrollBar.as:119]
---
When setting htmlText:
ypeError: Error #1009: Der Zugriff auf eine Eigenschaft oder eine Methode eines null-Objektverweises ist nicht möglich.
at flashx.textLayout.compose::FlowComposerBase/addLine()
at flashx.textLayout.compose::ComposeState/endLine()
at flashx.textLayout.compose::BaseCompose/composeParagraphElementIntoLines()
at flashx.textLayout.compose::BaseCompose/composeParagraphElement()
at flashx.textLayout.compose::ComposeState/composeParagraphElement()
at flashx.textLayout.compose::BaseCompose/composeBlockElement()
at flashx.textLayout.compose::BaseCompose/composeInternal()
at flashx.textLayout.compose::ComposeState/composeInternal()
at flashx.textLayout.compose::BaseCompose/composeTextFlow()
at flashx.textLayout.compose::ComposeState/composeTextFlow()
at flashx.textLayout.compose::StandardFlowComposer/http://ns.adobe.com/textLayout/internal/2008::callTheComposer()
at flashx.textLayout.compose::StandardFlowComposer/internalCompose()
at flashx.textLayout.compose::StandardFlowComposer/composeToPosition()
at flashx.textLayout.container::TextContainerManager/http://ns.adobe.com/textLayout/internal/2008::getActualNumLines()
at SingleTextContainerManager/get numLines()[/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRuntime/fl/text/SingleTextContainerManager.as:183]
at fl.text::TLFTextField/get maxScrollV()[/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRuntime/fl/text/TLFTextField.as:3135]
at fl.text::TLFTextField/set scrollV()[/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRuntime/fl/text/TLFTextField.as:3723]
at fl.text::TLFTextField/http://ns.adobe.com/textLayout/internal/2008::doImport()[/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRuntime/fl/text/TLFTextField.as:1365]
at fl.text::TLFTextField/set htmlText()[/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRuntime/fl/text/TLFTextField.as:2705]
at kp.ui.windows::BubbleWindow/set text()[/Users/chris/r/2010/09/kp-maintenance-2010-11/flash-5/kp/ui/windows/BubbleWindow.as:84]
