ron
12/08/2017, 9:44 AMedvin
12/08/2017, 9:44 AMedvin
12/08/2017, 9:44 AMwhenSelected {}
ron
12/08/2017, 9:45 AMedvin
12/08/2017, 9:45 AMedvin
12/08/2017, 9:45 AMron
12/08/2017, 9:45 AMedvin
12/08/2017, 9:45 AMonChange
on the selectedProperty()
.ron
12/08/2017, 9:49 AMron
12/08/2017, 9:59 AMron
12/08/2017, 9:59 AMron
12/08/2017, 10:00 AMcontroller.tabPane = tabpane {
tab<CategoryTabView> { tabClosingPolicy = UNAVAILABLE }
tab<WhatsNewTabView> { tabClosingPolicy = UNAVAILABLE }
tab<AuthorTabView> {
tabClosingPolicy = UNAVAILABLE
whenSelected {
println("author selected")
fire(MainController.AuthorSelected)
}
}
}
ron
12/08/2017, 10:00 AMron
12/08/2017, 10:00 AMinit {
println("reading authors")
runAsync {
readAllAuthors()
} ui {
root.items = it
controller.authorlist = it
}
subscribe<MainController.AuthorSelected> {
root.selectionModel.select(controller.authorModel.item)
root.scrollTo(controller.authorModel.item)
}
}
ron
12/08/2017, 10:12 AMjschneider
12/08/2017, 4:05 PMjschneider
12/08/2017, 4:11 PMedvin
12/08/2017, 6:35 PMrunAndWait
jschneider
12/08/2017, 9:46 PMron
12/09/2017, 8:29 AMrunAsyncWithProgress
deliberate when the action is not inside the codeblock of the button?ron
12/09/2017, 8:44 AMedvin
12/09/2017, 11:38 AMron
12/09/2017, 12:16 PMjavafxpert
12/09/2017, 6:46 PMjavafxpert
12/09/2017, 6:47 PMron
12/09/2017, 7:20 PMbutton("text").action{....}
seems to be the preferred way of doing a button. (this used to be not the case and the button("text") { action{.....}}
was normally used.)
If you do this new way with the button in a vbox / hbox / form (not in a buttonbar as in my example) it will throw a nullpointer exception:
Dec 09, 2017 8:17:50 PM tornadofx.DefaultErrorHandler uncaughtException
SEVERE: Uncaught error
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method tornadofx.FXKt.getChildList, parameter $receiver
at tornadofx.FXKt.getChildList(FX.kt)
at tornadofx.AsyncKt.runAsyncWithProgress(Async.kt:209)
at tornadofx.AsyncKt.runAsyncWithProgress$default(Async.kt:191)
at mcstories.app.ShowDifference$root$1$2.invoke(progressDifference.kt:21)
at mcstories.app.ShowDifference$root$1$2.invoke(progressDifference.kt:5)
at tornadofx.ControlsKt$action$2.handle(Controls.kt:521)
at tornadofx.ControlsKt$action$2.handle(Controls.kt)
edvin
12/09/2017, 9:04 PMcarlw
12/09/2017, 9:06 PM