You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Chris Martin (JIRA)" <ji...@apache.org> on 2015/06/06 07:05:00 UTC
[jira] [Closed] (FLEX-17210) mx:NumberFormatter failed when use
localeChain
[ https://issues.apache.org/jira/browse/FLEX-17210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Martin closed FLEX-17210.
-------------------------------
Assignee: Chris Martin (was: Justin Mclean)
Closing as not an sdk issue. The user needed to check the error property when they received blank after attempting a format.
The user can use the spark formatters which use the operating system's locales, which means that locale will result in a correct format result. However, even still they would have to check the errorText property in the event that the format result is blank.
As a point of interest, even if the user did check the error property it would return null as opposed to the expected default of "Invalid format". This is because the zh-Hans locale was not compiled in. This is expected behavior as we do not know what language to use to return an error message.
> 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
> Assignee: Chris Martin
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)