Flex: how to refer to the object itself?

I want to print the contents 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 think the "this" keyword refers to the application instead of the LinkButton, right? How can I refer to the LinkButton itself without adding an ID to all of my links?

thanks

+2


a source to share


1 answer


It doesn't work like Javascript. You will need to do this:

<mx:LinkButton label="{bookmarksRepeater.currentItem.name}" click="Alert.show(event.currentTarget.label.toString())" />

      



This should alert the meaning of the label.

+1


a source







All Articles