ActionScript 2.0 Components Language Reference |
|
|
|
| DataHolder component > Creating an application with the DataHolder component | |||
In this example, you add an array property to a DataHolder component's schema (an array) whose value is determined by ActionScript code that you write. You then bind that array property to the dataProvider property of a DataGrid component by using the Bindings tab in the Component inspector.
To use the DataHolder component in a simple application:namesArray property of the DataHolder component and the dataProvider property of the DataGrid component.
dataHolder.namesArray = [{name:"Tim"},{name:"Paul"},{name:"Jason"}];
This code populates the namesArray array with several objects. When this variable assignment executes, the binding that you established previously between the DataHolder component and the DataGrid component executes.
|
|
|
|