If you use the [Bindable] tag without specifying the type of event, then when the property changes its value, an event of the type: PropertyChangeEvent.PROPERTY_CHANGE, which is the string 'PropertyChange', will be sent.
Therefore, in order to be able to register to listen to this event, you need to say:
this.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, onOnChange);
The reason your listener function has never been called is because the type of event was wrong.
Note that the listener method will be called if any of the variables marked as Bindable in your class change, not just 'on'. This event has a property βpropertyβ that indicates which variable has been changed.
To avoid calling each Bindable variable, you need to specify the event in the [Bindable] tag:
[Bindable(event="myOnChangeEvent")]
and send this event manually, given that the property is changing (i.e.: in the installer), although this is not like what you wanted to do.
Laura source share