I am having Overload Resolution Ambiguity error in this line:
departureHourChoice!!.selectionModel.select(currentHourIndex)
个
For Reference:
departureHourChoice
是ChoiceBox<Int>
,从java.scene.control
开始currentHourIndex
is anInt
重载解决模糊性发生在
.select()
方法中;它是重载的,可以接受两种参数:(T obj)
或(int index)
.The
.select()
method allows for an item in aChoiceBox
to be selected, and you can determine which one can be selected by referencing to that item or to it's index. In this case, I want it to be selected by Index (int
).
如何解决超负荷解决歧义?