ActionScript 2.0 Components Language Reference |
|
|
|
| Delta interface > Delta.getOperation() | |||
Flash Player 7.
Flash MX Professional 2004.
delta.getOperation()
None.
A number; returns the operation that was performed on the item within the original collection.
Method; returns the operation that was performed on this item within the original collection. Valid values for this are DeltaPacketConsts.Added, DeltaPacketConsts.Removed, and DeltaPacketConsts.Modified.
You must either import mx.data.components.datasetclasses.DeltaPacketConsts or fully qualify each constant.
The following example calls the getOperation() method:
while(dpCursor.hasNext()) {
dpDelta = Delta(dpCursor.next());
op=dpDelta.getOperation();
trace("DeltaPacket source is: " + dpDelta.getDeltaPacket().getSource());
switch(op) {
case mx.data.components.datasetclasses.DeltaPacketConsts.Added:
trace("***In case DeltaPacketConsts.Added ***");
case mx.data.components.datasetclasses.DeltaPacketConsts.Modified: {
trace("***In case DeltaPacketConsts.Modified ***");
}
}
|
|
|
|