Might it be possible that the validation sample in...
# tornadofx
j
Might it be possible that the validation sample in https://edvin.gitbooks.io/tornadofx-guide/content/part1/11.%20Editing%20Models%20and%20Validation.html is wrong? I think the enableWhen should be on the button not in the action?
Copy code
buttonbar {
    button("Login", ButtonBar.ButtonData.OK_DONE).action {
        enableWhen { model.valid }
        model.commit {
            doLogin()
        }
    }
}