I think my explanation might be more helpful, but here:

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
        at 
flashx.textLayout.compose::TextFlowLine/http://ns.adobe.com/textLayout/internal/2008::recreateTextLine()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/TextFlowLine.as:937]
        at 
flashx.textLayout.compose::TextFlowLine/getTextLineInternal()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/TextFlowLine.as:891]
        at 
flashx.textLayout.compose::TextFlowLine/getTextLine()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/TextFlowLine.as:855]
        at 
flashx.textLayout.compose::ComposeState/composeNextLine()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/ComposeState.as:421]
        at 
flashx.textLayout.compose::BaseCompose/composeParagraphElementIntoLines()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/BaseCompose.as:1154]
        at 
flashx.textLayout.compose::BaseCompose/composeParagraphElement()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/BaseCompose.as:1010]
        at 
flashx.textLayout.compose::ComposeState/composeParagraphElement()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/ComposeState.as:331]
        at 
flashx.textLayout.compose::BaseCompose/composeBlockElement()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/BaseCompose.as:439]
        at 
flashx.textLayout.compose::BaseCompose/composeInternal()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/BaseCompose.as:989]
        at 
flashx.textLayout.compose::ComposeState/composeInternal()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/ComposeState.as:150]
        at 
flashx.textLayout.compose::BaseCompose/composeTextFlow()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/BaseCompose.as:767]
        at 
flashx.textLayout.compose::ComposeState/composeTextFlow()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/ComposeState.as:113]
        at 
flashx.textLayout.compose::StandardFlowComposer/http://ns.adobe.com/textLayout/internal/2008::callTheComposer()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/StandardFlowComposer.as:681]
        at 
flashx.textLayout.compose::StandardFlowComposer/internalCompose()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/StandardFlowComposer.as:765]
        at 
flashx.textLayout.compose::StandardFlowComposer/updateToController()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/StandardFlowComposer.as:561]
        at 
flashx.textLayout.compose::StandardFlowComposer/updateAllControllers()[/Users/harbs/Documents/ApacheFlex/flex-tlf/textLayout/src/flashx/textLayout/compose/StandardFlowComposer.as:522]

On Nov 6, 2014, at 8:06 PM, Joel Marks <j...@workiva.com> wrote:

> What was the stack trace?
> 
> On Thu, Nov 6, 2014 at 11:29 AM, Harbs <harbs.li...@gmail.com> wrote:
> 
>> 
>> On Nov 6, 2014, at 7:15 PM, Alex Harui <aha...@adobe.com> wrote:
>> 
>>> My memory is a bit fuzzy.  I thought TextLine recycling wasn’t
>>> per-paragraph, or is there a TextBlock per paragraph?
>> 
>> There’s generally one TextBlock per paragraph. My table work was actually
>> quite difficult because there was an assumption in many places that there
>> is ONLY one TextBlock per paragraph. Tables kind of blows that assumption
>> out of the water…
>> 
>> 
>>> The doc says that TextBlock.createTextLine/recreateTextLine returns null
>>> if the TextBlock is empty or if the width specified is less than the
>> width
>>> of the next element, and to check the TextBlock.textLineCreationResult
>>> property if you get a null.
>> 
>> It looks to me that it’s null if you ask for a line beyond the last one as
>> well.
>> 
>>> Could it just be that the number of lines in the paragraph when to zero?
>> 
>> No. The TextBlock has more than one line. The last line in the TextBlock
>> is the line of the previous TextFlowLine.
>> 
>>> 
>>> -Alex
>>> 
>>> On 11/6/14, 2:26 AM, "Harbs" <harbs.li...@gmail.com> wrote:
>>> 
>>>> I ran into an issue where I have a runtime error in
>>>> TextFlowLine.getTextLine(). I’m having trouble stepping through things,
>>>> but as best as I can figure, the issue is caused by the umber of lines
>> in
>>>> a paragraph becoming reduced.
>>>> 
>>>> The RTE happens inside TextFlowline.recreateTextLine() after requesting
>>>> the line from the TextBlock. The function (I’m not sure if it’s
>>>> createTextLine or recreateTextLine) returns null. The TextBlock.lastLine
>>>> is the line before the current one.
>>>> 
>>>> The caller of this mess is ComposeState.composeNextLine.
>>>> 
>>>> If anyone is still following me, my problem is I’m not sure the best way
>>>> to fix this. I’m not sure why this is breaking now. I’m not sure what I
>>>> changed that’s causing this error. Should I fix
>>>> TextFlowLine.getTextLine() to return null if there’s no more lines in
>> the
>>>> paragraph? Will there be any other repercussions from doing that? Should
>>>> I fix ComposeState/BaseCompose  so it does not try to compose the next
>>>> line once the paragraph is out of lines?
>>>> 
>>>> Is anyone familiar enough with the composer to even give me suggestions?
>>>> :-(
>>>> 
>>>> Harbs
>>> 
>> 
>> 

Reply via email to