set oldVal to a property on your event object.
Then place logic from your event function in your command's fault
handler.
Event should just be passing data while commands handle and execute
logic.
On 09/04/2007, at 10:48 PM, ba.chase wrote:
I have a itemEditEnd event handler for a datagrid. In the event
handler, I dispatch a cairngorm event to update the data on the
server. To the cairngorm event, I attach an anonymous function like:
updateEvent.resetValue = function():void{
e.currentTarget.selectedItem.display = oldVal;
}
where display is the field that was edited. In my cairngorm command,
I try to call this anonymous function if there was a problem updating
the database.
However, nothing happens. If I put an alert box, it seems my
anonymous function gets called several times, once with the old value
and once with the new value.
How should I be doing this?
Thanks