Trying to fix storage.

This commit is contained in:
Alexander Nozik 2018-08-01 17:04:46 +03:00
parent a4a3255aec
commit 8d457ad82d
4 changed files with 9 additions and 8 deletions

View File

@ -49,11 +49,11 @@ class NumassStorage : FileStorage {
val description: String val description: String
get() = meta.getString("description", "") get() = meta.getString("description", "")
private constructor(parent: FileStorage, config: Meta, shelf: String) : super(parent, config, shelf) { private constructor(parent: FileStorage, config: Meta, shelf: String) : super(parent, config, shelf)
refresh()
}
constructor(context: Context, config: Meta, path: Path) : super(context, config, path) { constructor(context: Context, config: Meta, path: Path) : super(context, config, path)
init {
refresh() refresh()
} }

View File

@ -149,7 +149,7 @@ class AmplitudeView : View(title = "Numass amplitude spectrum plot", icon = Imag
spectrum.withBinning(binning), spectrum.withBinning(binning),
adapter adapter
) )
group.set(plot) group.add(plot)
} }
group group
} }

View File

@ -14,6 +14,7 @@ import hep.dataforge.storage.api.ValueIndex
import hep.dataforge.tables.Adapters import hep.dataforge.tables.Adapters
import hep.dataforge.tables.ListTable import hep.dataforge.tables.ListTable
import hep.dataforge.tables.Table import hep.dataforge.tables.Table
import hep.dataforge.toList
import hep.dataforge.values.Values import hep.dataforge.values.Values
import javafx.collections.FXCollections import javafx.collections.FXCollections
import javafx.collections.MapChangeListener import javafx.collections.MapChangeListener
@ -59,7 +60,7 @@ class SlowControlView : View(title = "Numass slow control view", icon = ImageVie
"showSymbol" to false "showSymbol" to false
"showErrors" to false "showErrors" to false
} }
group.set(plot) group.add(plot)
} }
group group
} ui { } ui {
@ -80,7 +81,7 @@ class SlowControlView : View(title = "Numass slow control view", icon = ImageVie
loader.index loader.index
} }
try { try {
return ListTable(loader.format, index.query(query)) return ListTable(loader.format, index.query(query).toList())
} catch (e: Exception) { } catch (e: Exception) {
throw RuntimeException(e) throw RuntimeException(e)
} }

View File

@ -62,7 +62,7 @@ class StorageView(val storage: Storage) : View(title = "Numass storage", icon =
} }
is TableLoader -> { is TableLoader -> {
if (selected) { if (selected) {
scView.set(id, content) scView[id] = content
} else { } else {
scView.remove(id) scView.remove(id)
} }