Reputation: 64834
I want to print the content of the label property in the Alert window.
<mx:LinkButton label="{bookmarksRepeater.currentItem.name}" click="Alert.show(this.label.toString())" />
But the Alert window is completely empty. What am I doing wrong ?
I guess the keyword "this" is referencing the application instead of the LinkButton, right ? How can I reference the LinkButton itself, without having to add an ID to all my linkButtons ?
thanks
Upvotes: 2
Views: 172
Reputation: 1758
It doesn't work quite like Javascript. You'll have to do this:
<mx:LinkButton label="{bookmarksRepeater.currentItem.name}" click="Alert.show(event.currentTarget.label.toString())" />
That should alert the value of the label.
Upvotes: 1