This content has been marked as final. Show 4 replies
A shorter version of this question without getting to deep into [Bindable]
On a custom accordian mxml control how do I fire an event when a Bindable property is set?
public var modules:ICollectionView
I need to call this.function when modules is set.
public function onChange():void
for each (var m:Module in this.modules)
You're confusing the purpose of the Bindable tag. If a property is marked Bindable, it becomes a data source, not a destination. It makes no sense to mark a set-only property Bindable because you can't read from it (ie. can't be a source). So in your case, don't put the Bindable tag on the setter. Instead, put it on the source data object.
And yes, if you need to take some action when a property is set, then use a setter as you have been. If you still have problems, then post some of your code and maybe we can help you.
I understand that the component does not need to be marked bindable on the the data source. The problem seems to be that binding is happening before creationComplete in the application is called. I will try some of the other events on the Application.
Is there an application lifecycle document that describes the order in which these events fire?
True, if the source object is a known data source object type, then you don't need to label it Bindable.
How're you creating the bindings? If you're doing it in MXML, then all the bindings should be in place by the time creationComplete occurs.