I am changing the text on the label above:...">

Shortcut data Event ID does not fire

<mx:Label id="myLabel" dataChange="{trace('changed!!');}"  />

I am changing the text on the label above:

myLabel.text = "new text";

But nothing is traced as intended.

Am I using the wrong event? I thought that dataChange is started when the text in the label is changed.

+3
source share
1 answer

Desired event valueCommit. An event is dataChangespecific to a property data, not text.

<mx:Label id="myLabel" text="1" valueCommit="trace('changed')" />
<mx:Button label="Click Me" click="myLabel.text += '1'" />
+2
source

Source: https://habr.com/ru/post/1734125/


All Articles