User Guide
244 Chapter 6: Components Dictionary
For more information about TypedValue objects, see “TypedValue class (Flash Professional only)”
on page 244.
Returns
An array of strings describing any errors that occurred while attempting to set the new value.
Errors can occur under any of the following conditions:
• The data provided is not an acceptable type.
• The data provided cannot be converted to the data type of this field (for example, "abc"
cannot be converted to Number).
• The data is an acceptable type but does not meet the validation criteria of the field.
• The field is read-only.
Note: The actual text of an error message varies depending on the data type, formatters, and
encoders that are defined in the field’s schema.
Description
Method; sets a new value in the field, using the information in the field’s schema to process the
field. This method behaves similarly to
DataType.setAnyTypedValue(), except that it doesn’t
try as hard to convert the data to an acceptable data type. For more information, see
DataType.setAnyTypedValue().
Example
This example creates a new TypedValue object (a Boolean), and then assigns that value to a
DataType object named
field. Any errors that occur are assigned to the errors array.
import mx.data.binding.*;
var bool:TypedValue = new TypedValue (true, "Boolean");
var errors: Array = field.setTypedValue (bool);
See also
DataType.setTypedValue()
TypedValue class (Flash Professional only)
ActionScript Class Name mx.data.binding.TypedValue
A TypedValue object contains a data value, along with information about the value’s data type.
TypedValue objects are provided as parameters to, and are returned from, various methods of the
DataType class. The data type information in the TypedValue object helps DataType objects
decide when and how they need to do type conversion.
Note: To make this class available at runtime, you must include the data binding classes in your FLA
document.
For an overview of the classes in the mx.data.binding package, see “Classes in the mx.data.binding
package (Flash Professional only)” on page 213.