DataSet.applyUpdates()

Availability

Flash Player 7.

Edition

Flash MX Professional 2004.

Usage

dataSetInstance.applyUpdates()

Returns

Nothing.

Description

Method; signals that the DataSet.deltaPacket property has a value that you can access using data binding or directly by ActionScript. Before this method is called, the DataSet.deltaPacket property is null. This method has no effect if events have been disabled by means of the DataSet.disableEvents() method.

Calling this method also creates a transaction ID for the current DataSet.deltaPacket property and emits a deltaPacketChanged event. For more information, see DataSet.deltaPacket.

Example

The following code calls the applyUpdates() method on the my_ds DataSet.

my_ds.applyUpdates();

The following example adds four items to the my_ds DataSet instance on the Stage and displays each item in the top-level of the deltaPacket property:

my_ds.addItem({name:"Thomas", age:35, gender:"M"});
my_ds.addItem({name:"Orville", age:33, gender:"M"});
my_ds.addItem({name:"Jonathan", age:48, gender:"M"});
my_ds.addItem({name:"Carol", age:31, gender:"F"});

my_ds.applyUpdates();
var i:String;
for (i in my_ds.deltaPacket) {
    trace(i + ":\t" + my_ds.deltaPacket[i]);
}

See also

DataSet.deltaPacket


Flash CS3