You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Saju Thankathurai <sa...@gmail.com> on 2015/12/03 10:47:48 UTC

Get user typed data in textInput

Hi,

How do i get the User entered value in changing event of TextInput?

Ex: Consider user already entered 123 . Now user is trying to enter 8 in
between 2 and 3.
So the value becomes 1283,

I need this 1283 in the changing event. Is it is possible?

public function textInputChangeHandler(event:TextOperationEvent):void
{
if (event.operation is InsertTextOperation)
{
var originalText:String = (event.currentTarget as TextInput).text; // Here
i get 123
}
}

--
Saju

Re: Get user typed data in textInput

Posted by Alex Harui <ah...@adobe.com>.
Check to see what is in the TextOperationEvent.flowOperation.  It might
contain the text to be added.

On 12/3/15, 1:47 AM, "Saju Thankathurai" <sa...@gmail.com> wrote:

>Hi,
>
>How do i get the User entered value in changing event of TextInput?
>
>Ex: Consider user already entered 123 . Now user is trying to enter 8 in
>between 2 and 3.
>So the value becomes 1283,
>
>I need this 1283 in the changing event. Is it is possible?
>
>public function textInputChangeHandler(event:TextOperationEvent):void
>{
>if (event.operation is InsertTextOperation)
>{
>var originalText:String = (event.currentTarget as TextInput).text; // Here
>i get 123
>}
>}
>
>--
>Saju