tags:

views:

36

answers:

1

hi,

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

+1  A: 

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.

RJ Regenold