You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TextFieldListCell.converter_=(c) method does not work #262
The TextFieldListCell.converter_=(c) method does not change text converter property of the underlying delegate.
How to reproduce
Run the following test:
packageissues.issue262importjavafx.util.converter.IntegerStringConverterimportorg.junit.runner.RunWithimportorg.scalatest.FlatSpecimportorg.scalatest.Matchers._importorg.scalatest.junit.JUnitRunnerimportscalafx.Includes._importscalafx.scene.control.cell.TextFieldListCellimportscalafx.testutil.RunOnApplicationThread@RunWith(classOf[JUnitRunner])
classIssue262SpecextendsFlatSpecwithRunOnApplicationThread {
"TextFieldListCell" should "support changing of StringConverter" in {
valcell=newTextFieldListCell[Integer]
cell.converter =newIntegerStringConverter
cell.converter.value.fromString("123") should be(123)
}
}
When executed, it throws an exception:
[info] Issue262Spec:
[info] TextFieldListCell
[info] - should support changing of StringConverter *** FAILED ***
[info] java.lang.NullPointerException:
[info] at scalafx.util.UtilIncludes$$anon$1.fromString(UtilIncludes.scala:115)
[info] at issues.issue262.Issue262Spec$$anonfun$1.apply(Issue262Spec.scala:19)
[info] at issues.issue262.Issue262Spec$$anonfun$1.apply(Issue262Spec.scala:16)
[info] at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
[info] at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
[info] at org.scalatest.Transformer.apply(Transformer.scala:22)
[info] at org.scalatest.Transformer.apply(Transformer.scala:20)
[info] at org.scalatest.FlatSpecLike$$anon$1.apply(FlatSpecLike.scala:1682)
[info] at org.scalatest.TestSuite$class.withFixture(TestSuite.scala:196)
[info] at issues.issue262.Issue262Spec.scalafx$testutil$RunOnApplicationThread$$super$withFixture(Issue262Spec.scala:15)
[info] ...
Activity