DeltaPacket.getIterator()

Availability

Flash Player 7.

Edition

Flash MX Professional 2004.

Usage

deltaPacket.getIterator()

Parameters

None.

Returns

An interface to the iterator for the DeltaPacket collection that iterates through the delta packet's list of deltas.

Description

Method; returns the iterator for the DeltaPacket collection. This provides a mechanism for looping through the changes in the delta packet. For a complete description of this interface, see Iterator interface.

Example

The following example uses the getIterator() method to access the iterator for the deltas in a delta packet and uses a while statement to loop through the deltas:

var deltapkt:DeltaPacket = _parent.myDataSet.deltaPacket;
trace("*** Test deltapacket. Trans ID is: " + deltapkt.getTransactionId() + " ***");
var OPS:Array = new Array("added", "removed", "modified");
var dpCursor:Iterator = deltapkt.getIterator();
var dpDelta:Delta;
var op:Number;
var changeMsg:String;
while(dpCursor.hasNext()) {
    dpDelta = Delta(dpCursor.next());
    op=dpDelta.getOperation();
}