DataHolder component

The DataHolder component is a repository for data and a means of generating events when that data has changed. Its main purpose is to hold data and act as a connector between other components that use data binding.

NOTE

The DataHolder component is supported only if you are working in a document that specifies ActionScript 2.0 in its Publish Settings.

Initially, the DataHolder component has a single bindable property named data. You can add more properties by using the Schema tab in the Component inspector.

You can assign any type of data to a DataHolder property, either by creating a binding between the data and another property, or by using your own ActionScript code. Whenever the value of that data changes, the DataHolder component emits an event whose name is the same as the property, and any bindings associated with that property are executed.

In most cases, you do not use this component to build an application. It is needed only when you cannot bind external data directly to another component and you do not want to use a DataSet component. The DataHolder component is useful when you can't directly bind components (such as connectors, user interface components, or DataSet components) together. Below are some scenarios in which you might use a DataHolder component:

Related topics