In spark sdk -> ToggleButtonBase.as
what is the point of this code: dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
public function set selected(value:Boolean):void
if (value == _selected)
_selected = value;
If I remember correctly the FlexEvent.VALUE_COMMIT event lets the developer know the selected state has changed regardless of reason. If you add a "change" event listener to something like a checkbox(?) and then programmatically change the value by doing something like this "checkbox.selected=false", your change listener will not be triggered. However, if you are listening for the VALUE_COMMIT event, your listener WILL be triggered.
ah, makes perfect sense bro