Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > Data binding classes > ComponentMixins.getField() | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
componentInstance.getField(propertyName, [location])
propertyName A string that contains the name of a property of the specified component.
location An optional parameter that indicates the location of a field within the component property. This is useful if propertyName specifies a complex data structure and you are interested in a particular field of that structure. The location property can take one of three forms:
"a.b.c". This form is permitted for any complex data (ActionScript or XML).["a", "b", "c"]. This form is permitted for any complex data (ActionScript or XML). A DataType object.
Method; returns a DataType object whose methods you can use to get or set the data value in the component property at the specified field location. For more information, see DataType class.
This example uses the DataType.setAsString() method to set the value of a field located in a component's property. In this case the property (results) is a complex data structure.
import mx.data.binding.*;
var field : DataType = myComponent.getField("results", "po.address.name1");
field.setAsString("Teri Randall");
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/00002686.html