User Guide

DataSet.applyUpdates() 347
The following example uses the afterLoaded event of the DataSet component to populate
the
dataProvider property for a List component on the Stage. Drag a List component and a
DataSet component to the Stage, and give them instance names of
my_list and my_ds,
respectively. Add the following ActionScript code to Frame 1 of the main timeline:
my_list.labelField = "name";
var itemsListener:Object = new Object();
itemsListener.afterLoaded = function (evt_obj:Object):Void {
trace("After loaded");
my_list.dataProvider = evt_obj.target.items;
}
my_ds.addEventListener("afterLoaded", itemsListener);
var item_array:Array = [{name:"Douglas"}, {name:"Vinnie"},
{name:"Katherine"}, {name:"David"}];
my_ds.items = item_array;
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.