ianbrandt
06/03/2018, 2:27 AMError:(18, 8) Kotlin: Type inference failed: fun <T : UIComponent> EventTarget.plusAssign(type: KClass<T>): Unit cannot be applied to receiver: VBox arguments: (Button)
on:
root += Button("Press Me")
I'm assuming it's just that the guide is out of date, but wanted to check before filing a bug.ianbrandt
06/03/2018, 2:39 AMimport javafx.application.Application
import javafx.scene.control.Button
import javafx.scene.control.Label
import javafx.scene.layout.VBox
import tornadofx.App
import tornadofx.View
fun main(args: Array<String>) {
Application.launch(MyApp::class.java, *args)
}
class MyApp: App(MyView::class)
class MyView: View() {
override val root = VBox()
init {
root += Button("Press Me")
}
}
ianbrandt
06/03/2018, 2:53 AMclass MyView : View() {
override val root = vbox {
button("Press Me")
}
}