I am using an abstract class that I am not allowed to change.
The abstract class has this operation: saveButton.disableProperty().bind(validBooleanProperty.not())
.
In my subclass I have @FXML private var titleTextField: TextField = _
, which is a TextField
that contains the title of the project.
I would like to make it so that when the titleTextField
gets any sort of input, the saveButton
reacts to it. I have attempted to create a listener for the titleTextField.textProperty()
however I get Cannot resolve overloaded method 'addListener'
error. I have no idea why it does that.
How can I bind / listen to changes in the titleTextField
and make the saveButton
react in this case?
question from:
https://stackoverflow.com/questions/65947931/javafx-binding-confusion 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…