Nico Smeenk
04/29/2018, 1:42 PMborboss
04/29/2018, 5:55 PMborboss
04/29/2018, 5:58 PMborboss
04/29/2018, 6:25 PMval game = gameProperty.value
should be replaced with
val game: Game get() = gameProperty.value
But still it does not workthomasnield
04/29/2018, 7:47 PMthomasnield
04/29/2018, 8:45 PMListProperty
which is handy when I need to swap an ObservableList
for another ObservableList
. I discovered something interesting. If the backing ObservableList
in a ListProperty
changes, it seems to signal as a value change. Is this correct?edvin
04/30/2018, 7:05 AMonCancel
added to `Wizard`: https://github.com/edvin/tornadofx/issues/712edvin
04/30/2018, 7:08 AMListProperty
emits both item changes and value change for the actual list property.thomasnield
04/30/2018, 12:16 PMbjonnh
04/30/2018, 3:10 PMthomasnield
04/30/2018, 3:17 PMbjonnh
04/30/2018, 3:32 PMbjonnh
04/30/2018, 3:32 PMcarlw
04/30/2018, 3:50 PMhoang
04/30/2018, 4:01 PMhoang
04/30/2018, 4:03 PMlistview(values = myItems) {
style {
prefHeight = 230.px
}
}
But this is based on on px, and need trial-and-error before I can find the 230.px value in this case.Ruckus
04/30/2018, 4:10 PMhoang
04/30/2018, 4:14 PMhoang
04/30/2018, 4:17 PMtextfield()
with `stripNonInteger()`binding to a SimpleStringProperty()
b. the same as above but binding to SimpleIntegerProperty()hoang
04/30/2018, 4:18 PMb
seems to be the way, but every time a invalid input entered into the textbox, a ParseException thrown in console which seems not very nicehoang
04/30/2018, 4:23 PMa
seems smoother (no exception on every wrong keystroke) but I need to parse to Integer the prop.value
Ruckus
04/30/2018, 4:26 PMhoang
04/30/2018, 4:29 PMhoang
04/30/2018, 4:30 PM.value
of a SimpleIntegerProperty return a Number?
instead of Int?
, probably related to Java?thomasnield
04/30/2018, 4:38 PMRuckus
04/30/2018, 4:38 PMSimpleIntegerProperty
is a Property<Number>
Ruckus
04/30/2018, 4:39 PMget
and set
methods are overridden to use primitives (in JavaFX), but value
is defined farther up the chain (specifically all the way up in ObservableValue
).hoang
04/30/2018, 4:45 PMRuckus
04/30/2018, 4:54 PMSimpleIntegerProperty
(or any property that wraps a primitive) will never return null, which is why SimpleIntegerProperty::get
returns Int
and not Int?
.hoang
04/30/2018, 4:58 PM