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