[
https://issues.apache.org/jira/browse/FLEX-17210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14566155#comment-14566155
]
Chris Martin commented on FLEX-17210:
-------------------------------------
Okay, I have my recommendation now for this ticket and how we handle error
messages when a requested locale was not compiled in.
For this ticket, I suggest we remove the exception throw which will restore the
mustella tests to working order again. The issue in this ticket was not an SDK
issue, but rather the improper use of the Formatters. Users need to make sure
to check the error property when the format result is blank.
As for the "null" value in the error property when the locale was not compiled
in. I'm opting against adding in a special error message, as we would not know
the right language to present that error. I think we should add a note in the
ASDocs comments that if null is returned this means the locale that was
requested was not compiled in. It would then be up to the developer to make
sure they compile in the resource to get a meaningful error message.
If there are no objections over the next couple of days, i'll make the changes
and create a new ticket for the ASDocs changes regarding the error property of
the Formatter class.
> 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: Justin Mclean
> 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)