pashminakazi commented on issue #752: s:TextInput ValueCommit Function is not 
triggered
URL: https://github.com/apache/royale-asjs/issues/752#issuecomment-597011423
 
 
   Test Case : 
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <!--
   
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
   
   http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   
   -->
   <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
                                xmlns:mx="library://ns.apache.org/royale/mx"
                                xmlns:s="library://ns.apache.org/royale/spark"
                                width="600" height="400" >
        <!-- to do: layout="absolute" minWidth="955" minHeight="600" -->
        <fx:Script>
        <![CDATA[
        import mx.controls.Alert;
        import mx.events.FlexEvent;
        protected function txtFrom_valueCommitHandler(event:FlexEvent):void
        {
                txtFrom.text = fmtNumber1.format(txtFrom.text);
        }       
                        
        ]]>
        </fx:Script>
   
        <fx:Declarations>
                <mx:NumberFormatter id="fmtNumber1" decimalSeparatorFrom="." 
decimalSeparatorTo="." precision="3"
                                                        rounding="nearest" 
thousandsSeparatorFrom="," thousandsSeparatorTo=","  useNegativeSign="true"
                                                        
useThousandsSeparator="true"/>
        </fx:Declarations>
   
        
        <s:BorderContainer x="55" y="261" width="378" height="83">
                                <mx:Button accessibilityEnabled="false" uid="0" 
 mouseChildren="false" useHandCursor="true" buttonMode="true"  label="Convert" 
id="testBtn" toolTip="Test Rate"
                                                   x="233" width="67" 
fontFamily="Arial"  fontSize="11" 
                                                   cornerRadius="1" height="19" 
 textAlign="center" tabIndex="7" fontStyle="normal"  y="20"/>
                <s:TextInput x="129" y="18.5" width="94" height="22" 
valueCommit="txtFrom_valueCommitHandler(event)" enabled="true" id="txtFrom" 
tabIndex="6" restrict="0-9."/>
                <s:TextInput x="129" y="43" width="94" height="22" 
enabled="false" id="txtToUnit"/>
                <s:Label x="50" y="23" text="From Unit" textAlign="right" 
width="69"/>
                <s:Label x="9" y="3" text="Test Conversion " textAlign="left" 
width="184" fontWeight="bold"/>
                <s:Label x="50" y="46" text="To Unit" textAlign="right" 
width="69"/>
        </s:BorderContainer>
   
   </mx:Application>
   ```
   
   Paste.org.apache is not opening so i Paste the Example Here
   
![image](https://user-images.githubusercontent.com/42200979/76303209-2e2caf00-62e3-11ea-87fa-0006d148e852.png)
    

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to