DataGlue Object

DataGlue ObjectFlash 6

allows data providers to be linked to data consumers
DataGlue.methodName( )

Methods

bindFormatFunction( )

Binds a RecordSet object or other data provider to a UI component or other data consumer using a custom function that you create to format the data.

bindFormatStrings( )

Binds a RecordSet object or other data provider to a UI component or other data consumer using special string replacements.

Description

The DataGlue object allows developers to easily bind RecordSet objects and other data providers to UI components. In most cases, the binding can be done with one line of code, which reduces the complexity of populating UI components with data.

To use the DataGlue object, you have to include the DataGlue.as file in the first frame of the Flash movie:

#include "DataGlue.as"

One advantage of using DataGlue over other techniques of populating UI components is that the data provider and the data consumer are bound together; changing one will change the other. If you delete a row in a recordset that is supplying a combo box, for example, the combo box will also have one of its items deleted.

For a component to work with DataGlue, it has to be data-aware. A data-aware component interacts with the RSDataProviderClass and includes the following methods:

addItem( )
addItemAt( )
getLength( )
removeAll( )
removeItemAt( )
replaceItemAt( )
setDataProvider( )
sortItemsBy( )

See Also

The RecordSet class; Chapter 3 and Chapter 4



    Part III: Advanced Flash Remoting
     
    ASPTreeView.com
     
    Evaluation has Ц№ДШexpired.
    Info...