You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Jeremy Wischusen (JIRA)" <ji...@apache.org> on 2013/04/30 13:16:16 UTC
[jira] [Commented] (FLEX-17210) mx:NumberFormatter failed when use
localeChain
[ https://issues.apache.org/jira/browse/FLEX-17210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13645471#comment-13645471 ]
Jeremy Wischusen commented on FLEX-17210:
-----------------------------------------
Still occurring using SDK 4.9.1 on Mac OS X 10.7.5.
Code:
<?xml version="1.0"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="onCC()">
<fx:Script>
<![CDATA[
import mx.formatters.NumberFormatter;
private function onCC():void {
var nf:NumberFormatter = new NumberFormatter();
nf.precision = 2;
resourceManager.localeChain = ['zh-Hans'];
trace("number:" + nf.format(1 / 3));
resourceManager.localeChain = ['en_US'];
trace("number:" + nf.format(1 / 3));
}
]]>
</fx:Script>
</s:Application>
Result:
[trace] number:
[trace] number:0.33
> mx:NumberFormatter failed when use localeChain
> ----------------------------------------------
>
> Key: FLEX-17210
> URL: https://issues.apache.org/jira/browse/FLEX-17210
> Project: Apache Flex
> Issue Type: Bug
> Components: Formatters
> Affects Versions: Adobe Flex SDK Previous
> Environment: Affected OS(s): Windows
> Affected OS(s):
> Language Found: English
> Reporter: Adobe JIRA
> Labels: easytest
>
> Steps to reproduce:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="onCC();">
> <mx:Script>
> <![CDATA[
> import mx.formatters.NumberFormatter;
>
> private function onCC():void
> {
> var nf:NumberFormatter = new NumberFormatter();
> nf.precision = 2;
> resourceManager.localeChain = ['zh-Hans'];
> trace("number:"+nf.format(1/3));
> resourceManager.localeChain = ['en_US'];
> trace("number:"+nf.format(1/3));
> }
> ]]
> >
> </mx:Script>
> </mx:WindowedApplication>
>
> Actual Results:
>
> number:
> number:0.33
>
> Expected Results:
>
> number:0.33
> number:0.33
>
> Workaround (if any):
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira