Skip to main content
UbuntuPenguin
Participating Frequently
February 7, 2014
Question

TextArea crashes app when setting "text" property

  • February 7, 2014
  • 0 replies
  • 216 views

Hello Everyone,

   I am using the Adobe AIR 3.1 SDK, and in my application, when I set the "text" property on a TextArea, the application freezes up solid.  At first, I thought it had something to do with databinding as there is a similar issue with the Combobox/Dropdownlist, but when removing all databindings and just calling "textarea.text = foo", the application still crashed.

While investigating, I assume it has something to do with the drawing of the text area with respect to the amount of text.  Below is somewhat a snippet of what the code looks like.

    <s:Scroller width="100%" height="100%" horizontalScrollPolicy="off">
        <s:Group width="100%" height="100%">
            <s:layout>
                <s:VerticalLayout verticalAlign="middle" horizontalAlign="left" />
            </s:layout>
            <mx:Form width="100%">       
                <mx:FormItem label="Something:">
                    <s:Label includeIn="INSPECT_STATE"
                        text="{presenter.somethingtype}" />
                    <s:DropDownList width="200" includeIn="EDIT_STATE" .. />                   
                </mx:FormItem>

               <mx:FormItem label="description of something:" width="100%">

               BEGIN PROBLEM CHILD

                    <s:TextArea id="text" height="100"  editable.INSPECT_STATE="false" editable.EDIT_STATE="true" />          

               END PROBLEM CHILD    
                </mx:FormItem>
                <mx:FormItem label="somethingelse:">
                    <s:TextArea editable.INSPECT_STATE="false" editable.EDIT_STATE="true" minWidth="300" height="100" 
                                text="@{presenter.sometnotes}" />               
                </mx:FormItem>               
            </mx:Form>

When I restrict the text to being only 10 characters, it works properly, but when I have the full text which is much larger, it chokes.  It's only that middle child that acts up, the bottom textarea behaves fine.

This topic has been closed for replies.