ActionScript 2.0 Components Language Reference |
|
|
|
| DeltaPacket interface > DeltaPacket.getIterator() | |||
Flash Player 7.
Flash MX Professional 2004.
deltaPacket.getIterator()
None.
An interface to the iterator for the DeltaPacket collection that iterates through the delta packet's list of deltas.
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.
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();
}
|
|
|
|