I have a table column errorFixed
of type TableColumn[Error, Boolean]
inside a TableView[Error]
. My Error
class has a val fixed: Boolean
which I try to put into this table column.
I tried
errorFixed.cellValueFactory = features =>
ReadOnlyBooleanWrapper(features.value.fixed)
but it fails with
type mismatch;
found : scalafx.beans.property.ReadOnlyBooleanWrapper
required: scalafx.beans.value.ObservableValue[Boolean,Boolean]
which I really don't understand as ObservableValue[Boolean,Boolean]
is a supertype of ReadOnlyBooleanWrapper
according to the documentation.
If I cast it myself using .asInstanceOf[ObservableValue[Boolean, Boolean]]
it seems to work. What is going on here?