简体   繁体   English

Flash的TextArea控件中的错误

[英]Bug in TextArea control of Flash

<s:TextArea id="txtAddress" x="118" y="31" width="150" height="88" maxChars="100"
                                tabIndex="2"/>

txtAddress.text="AAAAAAAAAAAA CCCCCCCCCCCCCCCCCCCCCC P OABCDEFGHIJKLMNOPQRSTUVWXYZWSDER-682021";

This actionscript code crashes flash plugin. 此动作脚本代码使Flash插件崩溃。 Some times it will not crash but the text inside the text area will be overwrite twice. 有时它不会崩溃,但是文本区域内的文本将被覆盖两次。 The same is happening with every browser I have tested. 我测试过的每个浏览器都发生了同样的情况。 I think this is flash's bug. 我认为这是Flash的错误。 (Please note that if width of the textarea or if the value changes, it will work fine) Can any one comment on this? (请注意,如果textarea的宽度或值更改,则可以正常工作)对此可以有任何评论吗?

Below is the markup code: 下面是标记代码:

<s:BorderContainer x="2" y="32" height="125" width="565"  borderColor="#488AC7" 
                           backgroundColor="#EEF0EE" cornerRadius="2">
            <s:TextInput id="txtPhoneNo" x="407" y="3" width="150" maxChars="15" tabIndex="3"/>
            <s:Label x="12" y="13" text="Name" fontWeight="normal" />
            <s:TextInput x="118" y="3" width="150" id="txtName" maxChars="100" tabIndex="1" />
            <s:Label x="12" y="40" text="Address" fontWeight="normal"/>
            <s:TextArea id="txtAddress" x="118" y="31" width="150" height="88" maxChars="100"
                        tabIndex="2"/>
            <s:Label  x="302" y="13" text="Phone No." fontWeight="normal"/>
            <s:Label x="302" y="40" text="Mobile" fontWeight="normal" />
            <s:TextInput id="txtMobile" x="407" y="31" width="150" maxChars="15" tabIndex="4"/>
            <s:Label x="302" y="70" text="Email" fontWeight="normal" />
            <s:TextInput id="txtEmail" x="407" y="60" width="150" maxChars="100" tabIndex="5"/>
            <s:Label x="302" y="101" text="ECS Account NO"/>
            <s:TextInput id="txtECSAcNo" x="407" y="91" width="150" tabIndex="6"/>
        </s:BorderContainer>

This is isolated to your system or implementation. 这与您的系统或实现隔离。

What you have provided is functional: 您提供的功能是:

文字区

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               creationComplete="creationCompleteHandler(event)">

    <fx:Script>
        <![CDATA[
            import mx.events.FlexEvent;

            protected function creationCompleteHandler(event:FlexEvent):void
            {
                txtAddress.text = "AAAAAAAAAAAA CCCCCCCCCCCCCCCCCCCCCC P OABCDEFGHIJKLMNOPQRSTUVWXYZWSDER-682021";
            }
        ]]>
    </fx:Script>

    <s:TextArea id="txtAddress"
                x="118"
                y="31"
                width="150"
                height="88"
                maxChars="100"
                tabIndex="2" />

</s:Application>

it seems somewhere else, you set the fontsize of the textarea to an invalid value. 似乎在其他地方,您将textarea的fontsize设置为无效值。 I had the same problem before, maybe somewhere you just set it to some value like "10px". 之前我也遇到过同样的问题,也许在某个地方您只是将其设置为“ 10px”之类的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM