Ahmed Mourad
07/19/2020, 5:39 PMStringProperty
and I want to use it for a DatePicker
which required an ObjectProperty<LocalDate>
Is there a way to pass a converter or something to do the mapping between the properties? What's the best practice for this?
I can't change the type of the StringProperty
variable, it's a bit of a special case.sbyrne
07/19/2020, 5:47 PMfun <T> StringProperty.toObjectProperty( to:(String)->T, from:(T)->String ): ObjectProperty<T>
.sbyrne
07/19/2020, 5:47 PMSimpleObjectProperty<T>
and set up listeners to copy values back and forth, with conversion.Ahmed Mourad
07/19/2020, 8:10 PM