User Guide
DataSet component (Flash Professional only) 343
DataSet.resolveDelta
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
on(resolveDelta) {
// insert your code here
}
listenerObject = new Object();
listenerObject.resolveDelta = function (eventObj) {
// insert your code here
}
dataSet.addEventListener("resolveDelta", listenerObject)
Description
Event; broadcast when DataSet.deltaPacket is assigned a delta packet whose transaction ID
matches that of a delta packet previously retrieved from the DataSet object, and that has messages
associated with any of the deltas or DeltaItem objects contained by that delta packet.
This event gives you the chance to reconcile any error returned from the server while attempting
to apply changes previously submitted. Typically, you use this event to display a “reconcile dialog
box” with the conflicting values, allowing the user to make appropriate modifications to the data
so that it can be re-sent.
The event object (
eventObj) contains the following properties:
target The DataSet object that generated the event.
type The string "resolveDelta".
data An array of deltas and associated DeltaItem objects that have nonzero length messages.
Example
This example displays a form called reconcileForm (not shown) and calls a method on that form
object (
setReconcileData()) that allows the user to reconcile any conflicting values returned by
the server.
myDataSet.addEventListener("resolveDelta", resolveDelta);
function resolveDelta(eventObj:Object) {
reconcileForm.visible = true;
reconcileForm.setReconcileData(eventObj.data);
}
// in the reconcileForm code
function setReconcileData(data:Array):Void {
var di:DeltaItem;
var ops:Array = ["property", "method"];
var cl:Array;
// change list
var msg:String;