Closed SKeeneCode closed 3 years ago
close ?
I realized the obvious: I can cast to ObservableValue<Long>
where I bind the spinner:
bind(longProperty as ObservableValue<Long>)
Which means I can use longProperty
just fine elsewhere. A silly thing I didn't spot because I was tired :)
Although, if you think there's a better way I'm open ears.
I'm surprised javafx does not have a SpinnerLongValueFactory
already, leaving it to the user to write. Might be a PR candidate for tornadofx.
There is a nuance in type inference. Will need to be corrected
Short and simple: The following code does not compile:
How can I bind my spinner value to a longProperty? Been scratching at this for a few hours now.
I noticed if I cast the property like so:
val longProperty = (0L).toProperty() as ObservableValue<Long>
it accepts the binding, but then I lose all the useful utility of mylongProperty
.