Skip to main content
Participant
November 25, 2010
Question

Error #1009 when scroll the verticalscrollbar in textarea

  • November 25, 2010
  • 1 reply
  • 606 views

Hi All,

     I create a simple use flash builder 4,main code like

             <fx:String id="htmlText">

                    <![CDATA[

                         <p><img src="imagepath"/></p>

                         <p><img src="imagepath"/></p>

                    ]]>

             </fx:String>

             <s:TextArea width="580" height="580" textFlow="{TextConverter.importToFlow(htmlText, TextConverter.TEXT_FIELD_HTML_FORMAT)}"/>

    It's work good when image size small than the textarea.If image size overflow,when I scroll the verticalscrollbar there comes out:

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at flashx.textLayout.container::ContainerController/getScrollDelta()
        at  flashx.textLayout.container::TextContainerManager/getScrollDelta()
        at  spark.components::RichEditableText/getVerticalScrollPositionDelta()
        at  spark.components::VScrollBar/changeValueByStep()
        at  spark.components.supportClasses::ScrollBarBase/button_buttonDownHandler()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::UIComponent/dispatchEvent()
        at  spark.components.supportClasses::ButtonBase/commitProperties()
        at mx.core::UIComponent/validateProperties()
        at mx.managers::LayoutManager/validateProperties()
        at mx.managers::LayoutManager/doPhasedInstantiation()
        at mx.managers::LayoutManager/doPhasedInstantiationCallback()

        please help!

        thanks

This topic has been closed for replies.

1 reply

Adobe Employee
November 30, 2010

I have not been able to reproduce this error here. Can you post a full example that has this problem? Or maybe you can alter the application below so it crashes. Then I can look into it further.

Thanks!

<s:Application name="school"

explicitMinWidth="100"

explicitMinHeight="100"

    xmlns="http://ns.adobe.com/mxml/2009"

xmlns:s="library://ns.adobe.com/flex/spark"

xmlns:mx="library://ns.adobe.com/flex/mx">

    <Script>

    <![CDATA[

import flashx.textLayout.conversion.TextConverter;

        ]]>

    </Script>

<Declarations>

<String id="htmlText">

<![CDATA[

<p><img src="image1.jpg" width="700" height="700"/></p>

<p><img src="image1.jpg" width="700" height="700"/></p>

]]>

</String>

</Declarations>

<s:TextArea width="580" height="580" textFlow="{TextConverter.importToFlow(htmlText, TextConverter.TEXT_FIELD_HTML_FORMAT)}"/>

</s:Application>