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.

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 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";

Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00002692.html