DataGlue Object


DataGlue Object Flash 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



Flash Remoting
Flash Remoting: The Definitive Guide
ISBN: 059600401X
EAN: 2147483647
Year: 2003
Pages: 239
Authors: Tom Muck

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net