Reputation: 5818
<mx:Label id="myLabel" dataChange="{trace('changed!!');}" />
I change the text in the above label:
myLabel.text = "new text";
But nothing is traced as it's supposed to.
Am I using a wrong event? I thought dataChange is fired when text in the label is changed.
Upvotes: 3
Views: 1844
Reputation: 74909
The event you want is valueCommit
. The dataChange
event is specific to the data
property, not text
.
<mx:Label id="myLabel" text="1" valueCommit="trace('changed')" />
<mx:Button label="Click Me" click="myLabel.text += '1'" />
Upvotes: 2