tags:

views:

99

answers:

1
A: 

You could bind a specific function to the data property using BindingUtils when your ApplicationModel is first set in your view:

public function set model(applicationModelInstance:ApplicationModel):void
{
    _applcationModelInstance = applicationModelInstance;
    BindingUtils.bindSetter(dataRefreshed, _applicationModelInstance, "data");
}

protected function dataRefreshed(value:Object):void
{
    // do whatever you need to do here. 
    // value==applicationModelInstance.data
}

De-registering a binding like this to avoid memory leaks is a bit tricky, but since your ApplicationModel is a singleton you don't need to anyways.

leolobato
This seems to work! The function I expect to be called is in fact called. Thanks!
thomas