The LastOperationStatus class enumerates constant values that represent the
status of the most recent globalization service operation.
These values can be retrieved through the read-only property
lastOperationStatus available in most globalization classes.
public static const ERROR_CODE_UNKNOWN:String = errorCodeUnknown
Language Version :
ActionScript 3.0
Product Version :
Flex 4.5s
Runtime Versions :
Flash Player 10.1, AIR 2.5
Indicates that the return error code is not known.
Any non-static method or read/write properties can return this error
when the operation is not successful and the return error code is not
known.
public static const ILLEGAL_ARGUMENT_ERROR:String = illegalArgumentError
Language Version :
ActionScript 3.0
Product Version :
Flex 4.5
Runtime Versions :
Flash Player 10.1, AIR 2.5
Indicates that an argument passed to a method was illegal.
For example, the following code shows that an invalid argument error
status is set when CurrencyFormatter.grouping property is
set to the invalid value "3;".
var cf:CurrencyFormatter = new CurrencyFormatter();
cf.setStyle("locale","en_US");
cf.groupingPattern = "3;";
trace(cf.lastOperationStatus); // "illegalArgumentError"
public static const INVALID_ATTR_VALUE:String = invalidAttrValue
Language Version :
ActionScript 3.0
Product Version :
Flex 4.5
Runtime Versions :
Flash Player 10.1, AIR 2.5
Indicates that a given attribute value is out of the expected range.
The following example shows that setting the
NumberFormatter.negativeNumberFormat property to an
out-of-range value results in an invalid attribute value status.
var nf:NumberFormatter = new NumberFormatter();
nf.setStyle("locale","en_US");
nf.negativeNumberFormat = 9;
nf.lastOperationStatus; // "invalidAttrValue"
Indicates that the last operation succeeded without any errors.
This status can be returned by all constructors, non-static methods,
static methods and read/write properties.
See also
flash.globalization.LastOperationStatus.NO_ERROR
NUMBER_OVERFLOW_ERROR
Constant
public static const NUMBER_OVERFLOW_ERROR:String = numberOverflowError
Language Version :
ActionScript 3.0
Product Version :
Flex 4.5
Runtime Versions :
Flash Player 10.1, AIR 2.5
Indicates that an operation resulted a value that exceeds a specified
numeric type.
public static const PARSE_ERROR:String = parseError
Language Version :
ActionScript 3.0
Product Version :
Flex 4.5
Runtime Versions :
Flash Player 10.1, AIR 2.5
Indicates that the parsing of a number failed.
This status can be returned by parsing methods of the formatter classes,
such as CurrencyFormatter.parse() and
NumberFormatter.parseNumber().
For example, if the value "12abc34" is passed as the parameter to the
CurrencyFormatter.parse() method, the method returns "NaN"
and sets the lastOperationStatus value to
LastOperationStatus.PARSE_ERROR.
public static const PATTERN_SYNTAX_ERROR:String = patternSyntaxError
Language Version :
ActionScript 3.0
Product Version :
Flex 4.5
Runtime Versions :
Flash Player 10.1, AIR 2.5
Indicates that the pattern for formatting a number, date, or time is
invalid.
This status is set when the user's operating system does not support the
given pattern.
For example, the following code shows the value of the
lastOperationStatus property after an invalid "xx" pattern
is used for date formatting:
var df:DateTimeFormatter = new DateTimeFormatter();
df.setStyle("locale","en_US");
df.setDateTimePattern("xx");
trace(df.lastOperationStatus); // "patternSyntaxError"
public static const UNEXPECTED_TOKEN:String = unexpectedToken
Language Version :
ActionScript 3.0
Product Version :
Flex 4.5
Runtime Versions :
Flash Player 10.1, AIR 2.5
Indicates that an unexpected token was detected in a Locale ID string.
For example, the following code shows the value of the
lastOperationStatus property after an incomplete string is
used when requesting a locale ID.
As a result the lastOperationStatus property is set to the
value UNEXPECTED_TOKEN after a call to the
LocaleID.getKeysAndValues() method.
var locale:flash.globalization.LocaleID = new flash.globalization.LocaleID("en-US@Collation");
var kav:Object = locale.getKeysAndValues();
trace(locale.lastOperationStatus); // "unexpectedToken"
public static const UNSUPPORTED_ERROR:String = unsupportedError
Language Version :
ActionScript 3.0
Product Version :
Flex 4.5
Runtime Versions :
Flash Player 10.1, AIR 2.5
Indicates that the requested operation or option is not supported.
This status can be returned by methods such as
DateTimeFormatter.setDateTimePattern() and when retrieving
properties suce as Collator.ignoreCase.
public static const USING_FALLBACK_WARNING:String = usingFallbackWarning
Language Version :
ActionScript 3.0
Product Version :
Flex 4.5
Runtime Versions :
Flash Player 10.1, AIR 2.5
Indicates that a fallback value was set during the most recent
operation.
This status can be returned by constructors and methods such as
DateTimeFormatter.setDateTimeStyles(), and when retrieving
properties such as CurrencyFormatter.groupingPattern.