Greetings to y'all
I have a simple code which us calling DateFormatter for conversion from String
to Date like follow:
public static function parseBlobDate(date:String):Date{
return DateFormatter.parseDateString(date);
}
which triggers an error : TypeError: Error #1009: Cannot access a property or
method of a null object reference.
at mx.formatters::DateBase$/get
http://www.adobe.com/2006/flex/mx/internal::defaultStringKey()[D:\flex_sdk\Sources\flex-sdk\frameworks\projects\framework\src\mx\formatters\DateBase.as:195]
at
mx.formatters::DateFormatter$/parseDateString()[D:\flex_sdk\Sources\flex-sdk\frameworks\projects\framework\src\mx\formatters\DateFormatter.as:218]
In the function defaultStringKey when I debug to see where the error comes from
I noticed that monthNamesLong is null which is unusual.
mx_internal static function get defaultStringKey():Array /* of String */
{
initialize();
return monthNamesLong.concat(timeOfDay);
}
this code was working before but somehow it is not anymore. What am I doing
wrong?