[
https://issues.apache.org/jira/browse/FLEX-34033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14097969#comment-14097969
]
Alex Harui commented on FLEX-34033:
-----------------------------------
Most of the time, the SDK does not check for bad programmer input. I would
rather not scan every string being assigned to a text widget for newlines. If
you assign really long strings that could affect performance. I think you'll
have to scan it before assigning if you suspect that it might contain newlines.
> single-line TextInput keeps a newline when TextInput.text = "abc\n".
> --------------------------------------------------------------------
>
> Key: FLEX-34033
> URL: https://issues.apache.org/jira/browse/FLEX-34033
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: TextInput
> Environment: Windows 7
> Reporter: Shigeru Nakagaki
> Attachments: TextInput_keeps_newline.png, src.zip
>
>
> Is this right?
> <?xml version="1.0" encoding="utf-8"?>
> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:mx="library://ns.adobe.com/flex/mx">
>
> <s:layout>
> <s:VerticalLayout />
> </s:layout>
>
> <fx:Script>
> <![CDATA[
>
> protected function button1_clickHandler(event:MouseEvent):void
> {
> txt.text = "abc\n";
> }
>
> ]]>
> </fx:Script>
>
> <s:TextInput id="txt"/>
> <s:Button label="set"
> click="button1_clickHandler(event)"/>
>
> </s:WindowedApplication>
--
This message was sent by Atlassian JIRA
(v6.2#6252)