I have the following code:
protected function bindRevisionHistory():void
{
for each (var item:* in chartVBox.getChildren()){
if (item is HistoryChart){
BindingUtils.bindProperty(item, 'revisionHistoryVisible',
_projectHistoryModel, 'showProjectRevisionHistory');
}
}
}
This function is called when charts are ready.
Then I have a checkbox with the following click event handler:
protected function
showProjectRevisionHistory_changeHandler(event:Event):void
{
// Set a flag to show/hide revision flag while getting new data for charts
_projectHistoryModel.showProjectRevisionHistory =
event.currentTarget.selected;
}
Initially _projectHistoryModel.showProjectRevisionHistory = true;
Selecting and unselecting the checkbox correctly shows and hides bound
elements.
But if initially set _projectHistoryModel.showProjectRevisionHistory =
false; then selecting the checkbox does not have any effect.
Any idea?
Thanks