Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
Adobe Flex SDK Previous
-
None
-
None
-
Affected OS(s): All OS Platforms
Language Found: English
Description
Please see the following sample 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="TestWeekdayname()"
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 TestWeekdayname ():void {
try
catch(e:Error)
{ gslibErrStr = e.toString(); }try
{ dtfFormat = new spark.formatters.DateTimeFormatter( ); //dtfFormat.getWeekdayNames("standalone", "invalid" ) ; dtfFormat.getWeekdayNames("standalone", null ) ; }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>
=========================
For GSLib formatter , it will throw typeError for "null" paramter , and ArgumentError for invalid parameter .
However , spark formatter cannot thrown error like gslib.
the same issue also occur for getMonthNames() .