Skip to main content

Hyperlink operation with Label does not work

2 replies [Last post]
tobiasodell
Offline
Joined: 2008-05-13
Points: 0

Hi,

The fx script won't compile when I'm using the format:

Label {
text: bind
"
<a href='{#(operation() {model.numClicks++;})}'>
I'm a hyperlink!
</a>
"
}
Any ideas?

Best regards,
/Tobias

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexsch
Offline
Joined: 2007-07-12
Points: 0

I know that [b]operation [/b]keyword has been changed to [b]function[/b] in a compiler version.

Unfortunately, even a simple example does not work for me:

[code]
import javafx.ui.*;

Frame{
content: Label {
text: bind " I'm a hyperlink! "
}
visible: true
}
[/code]

tobiasodell
Offline
Joined: 2008-05-13
Points: 0

I don't know why it doesn't work any longer but I found out a workaround but it would be nice to know why or how it works in the new compiler.

WO:
Label{
text: bind " onMouseClicked: function(e){
scripting goes here
}
}