Warning about number of arguments in property change handler method [message #1599727] |
Tue, 03 February 2015 16:09  |
Eclipse User |
|
|
|
Hi,
I'm using e(fx)clipse 1.1.0 and keep getting warnings in my controller
that I think are wrong. There are two kinds of listeners in JavaFX,
those that listen to UI events like action (Button) and those that
listen to property change events like when the text of a text field
changes. Both can be handled by methods mentioned in FXML attributes
beginning with on, either on<Event> or on<Property>Change, with the
method name prefixed by #, e.g. onAction="#handleAction" or
onTextChange="#handleTextChange".
Event methods should have only one or no arguments, while the property
change methods must have three, the ObservableValue, the old and the new
value. However, FXML's compiler participant (I think it is
FxmlAnnotationCompilationParticipant) doesn't seem to know about the
latter, since I keep getting warnings stating that "JavaFX controller
method must have 0 or exactly 1 argument". However, everything works,
but the warning is confusing to my students and a bit annoying.
I couldn't find a bug entry, is this a knows problem?
Hallvard
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03412 seconds