User Guide
236 Chapter 6: Components Dictionary
DataType.encoder
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
dataTypeObject.encoder
Description
Property; provides a reference to the encoder object associated with this field, if one exists. You
can use this property to access any properties and methods defined by the specific encoder applied
to the field in the Component inspector’s Schema tab.
If no encoder was applied to the field in question, then this property returns
undefined.
For more information about the encoders provided with Flash MX Professional 2004, see
“Schema encoders” in Using Flash.
Example
The following example assumes that the field being accessed (isValid) uses the Boolean encoder
(
mx.data.encoders.Bool). This encoder is provided with Flash MX Professional 2004 and
contains a property named
trueStrings that specifies which strings should be interpreted as
true values. The code below sets the trueStrings property for a field’s encoder to be the strings
“Yes” and “Oui”.
var myField:mx.data.binding.DataType = dataSet.getField("isValid");
myField.encoder.trueStrings = "Yes,Oui";
DataType.formatter
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
dataTypeObject.formatter
Description
Property; provides a reference to the formatter object associated with this field, if one exists. You
can use this property to access any properties and methods for the formatter object applied to the
field in the Component inspector’s Schema tab.
If no formatter was applied to the field in question, this property returns
undefined.