I am converting a Flex 1.5 app to Flex 3 and came across the following
code:
[ChangeEvent("change")]
[Bindable(event="change")]
public var highScores:Array;
My understanding is that [Bindable(event="change")] specifies that
when a "change" event is dispatched then anything bound to the
variable will be updated. The line [ChangeEvent("change")] means that
when the variable highScores is updated it fires off the event "change".
In Flex 3 there is no tag ChangeEvent, so in this case I would
dispatch a "change" event when highScores is set e.g.
highScores = newValue;
dispatchEvent(new Event("change"));
This will broadcast a "change" event that is picked up by this
specific variable and any other variables that are also setup with
this same event.
Is this correct or is there a different method tha would work as well?
Thanks Andrew