| Author |
setting EventHandlers in View class from Controller
|
Benjamin Trenker
Greenhorn
Joined: Jan 26, 2013
Posts: 1
|
|
Hi all,
i've just started playing around with JavaFx2 and Scala. Trying to achieve a 'Passive View' I soon ran into problems setting EventHandlers for my buttons from within the controller class, 'cause the EventHandler never gets triggered when setting it this way:
It would be nice if anybody could tell me how it is possible doing it this way instead of setting the EventHandler directly in the View - class.
thanks in advance,
Benni
|
 |
Manuel Petermann
Ranch Hand
Joined: Jul 19, 2011
Posts: 175
|
|
I don't know how you are setting up your view. If you are using a FxmlClassLoader you could use something like
You would obviously have to change it to Scala. If you are doing this without fxml i am not sure if that is a build in feature of javafx. I am not that familiar with Scala though.
|
Please correct my English.
|
 |
 |
|
|
subject: setting EventHandlers in View class from Controller
|
|
|