summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TeXLive/TLPackage.scala
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/support/tlcockpit/src/main/scala/TeXLive/TLPackage.scala')
-rw-r--r--Master/texmf-dist/source/support/tlcockpit/src/main/scala/TeXLive/TLPackage.scala23
1 files changed, 12 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TeXLive/TLPackage.scala b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TeXLive/TLPackage.scala
index cb9d8c7e88e..9a797d9c8ae 100644
--- a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TeXLive/TLPackage.scala
+++ b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TeXLive/TLPackage.scala
@@ -1,14 +1,15 @@
package TeXLive
-import scalafx.beans.property.StringProperty
-import scalafx.beans.property.IntegerProperty
-import scalafx.beans.property.BooleanProperty
+import scalafx.beans.property.{ObjectProperty, StringProperty}
-class TLPackage(name_ : String, lrev_ : String, rrev_ : String, shortdesc_ : String, size_ : String, installed_ : String) {
- val name = new StringProperty(this, "name", name_)
- val shortdesc = new StringProperty(this, "shortdesc", shortdesc_)
- val lrev = new StringProperty(this, "revision", lrev_)
- val rrev = new StringProperty(this, "revision", rrev_)
- val size = new StringProperty(this, "size", size_)
- val installed = new StringProperty(this, "installed", installed_)
-}
+// Note!!! we have to use ObjectProperty[Int] here instead of IntegerProperty
+// since IntegerProperty does NOT implement Observable[Int,Int]
+// see https://github.com/scalafx/scalafx/issues/243
+case class TLPackage(name: StringProperty, lrev: ObjectProperty[Int], rrev: ObjectProperty[Int],
+ shortdesc: StringProperty, size: ObjectProperty[Int], installed: StringProperty) {
+ def this(_name: String, _lrev: String, _rrev: String, _shortdesc: String, _size: String, _installed: String) =
+ this(
+ StringProperty(_name), ObjectProperty[Int](_lrev.toInt), ObjectProperty[Int](_rrev.toInt),
+ StringProperty(_shortdesc), ObjectProperty[Int](_size.toInt), StringProperty(_installed)
+ )
+} \ No newline at end of file