Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
Adobe Flex SDK Previous
-
None
-
None
-
Affected OS(s): All OS Platforms
Language Found: English
Description
When setting dateStyle/TimeStyle/dateTimepattern as an invalid value , for example , dtfFormat.timeStyle="abcde" ;
GSLib will throw the following error :
ArgumentError: Error #2008: Parameter DateTimeFormatterStyle must be one of the accepted values.
However , spark DateTimeFormatter cannot throw this argumentError. Please see the following code to reproduce the issue:
===========
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="init()"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
import flash.globalization.DateTimeFormatter ;
import spark.formatters.DateTimeFormatter ;
public var dfgslib:flash.globalization.DateTimeFormatter ;
public var dtfFormat:spark.formatters.DateTimeFormatter ;
private var errorStr:String;
private var gslibErrStr:String;
public function init () {
try
catch(e:Error)
{ gslibErrStr = e.toString(); }try
{ dtfFormat = new spark.formatters.DateTimeFormatter( ); dtfFormat.dateStyle = "long" ; dtfFormat.timeStyle = "abcd" ; }catch(e:Error)
{ errorStr = e.toString(); } trace ( "-------- error from gslib -----" ) ;
trace(gslibErrStr);
trace ( "-------- error from spark -----" ) ;
trace(errorStr);
}
]]
>
</fx:Script>
<fx:Declarations>
</fx:Declarations>
</s:Application>
===========
the output result is :
-------- error from gslib -----
ArgumentError: Error #2008: Parameter DateTimeFormatterStyle must be one of the accepted values.
-------- error from spark -----
null
We use the latest flex sdk, changlist: #13064