tornadofx
tornadofx copied to clipboard
Selection Bug DataGrid JDK13 TornadoFX 2.0 SNAPSHOT
Hey guys,
i am using openjdk13 and tornadofx 2.0 snapshot - most things i tried so far are working fine.
Except for the DataGrid. When i try this simple code there is no selection happening. Is this a known bug? I didnt find anything about it except the thread about jdk11 where that person did not used the snapshot of tornadofx.
class DatagridTest : View() {
val numbers = (1..10).toList()
override val root: Parent = datagrid(numbers) {
singleSelect = true
}
}
with the following style.css which is set in the App() constructor
init {
datagridCell {
backgroundColor = multi(Color.RED)
and(selected) {
padding = box(10.pt)
backgroundColor = multi(Color.BLACK)
}
}
}
The Cells are actually displayed Red like i would expect. Just when i click on them, nothing happens - tried on X11 and Wayland - neither worked.
Does anybody has some tips on how i could try to find out myself whats going wrong here? I do not get any error message - thats leaves me kind of clueless. How would you try to find the reason? I set actionHandler on the cells and the mousclick is recognised - but the selectionmodel stays empty
https://github.com/edvin/tornadofx/tree/jdk10#tornadofx-and-jdk-9 performed this action?
--add-opens javafx.controls/javafx.scene.control.skin=module-name
Thank you i am finally gettin somehwere... when i run "gradle run" instead of the intellij task of building the project i actually saw now a module problem
java.lang.reflect.InaccessibleObjectException: Unable to make protected void javafx.scene.control.skin.VirtualFlow.rebuildCells() accessible: module javafx.controls does not "opens javafx.scene.control.skin" to unnamed module @704921a5
I have in my setting.gradle a rootProject.name
set. So it should not find it as unnamed? Anyway i try some things from here ..
Edit: No, I cannot get it working. Does it work for you?
following i set in my build script
application {
applicationDefaultJvmArgs = listOf(
"--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED"
)
}
though i have in my settings.gradle.kts rootProject.name = "BootstrapTornadoFX2"
but when i start it complain that java.lang.reflect.InaccessibleObjectException: Unable to make protected void javafx.scene.control.skin.VirtualFlow.rebuildCells() accessible: module javafx.controls does not "opens javafx.scene.control.skin" to unnamed module @4fcd19b3
and this error disappears when i open it to ALL-UNNAMED
any other suggestions?
Hi @deggers,
JPMS is a difficult topic :)
Basically, if your application is running on class-path instead of module-path, then it is called as unnamed module
by JPMS.
Therefore, exporting the package to ALL-UNNAMED
module is the correct thing to do here.
Hi!
I'm having the same issue, nothing happens when I click on my elements.
When I try to call selectionModel.select(index = 0)
by hand, it throws:
SEVERE: Uncaught error
kotlin.TypeCastException: null cannot be cast to non-null type tornadofx.DataGridSkin<T>
Same versions of JDK and tornadofx as @deggers, I also have the --add-opens
params set. Has anyone found anything to help with that?
Thank you i am finally gettin somehwere... when i run "gradle run" instead of the intellij task of building the project i actually saw now a module problem
java.lang.reflect.InaccessibleObjectException: Unable to make protected void javafx.scene.control.skin.VirtualFlow.rebuildCells() accessible: module javafx.controls does not "opens javafx.scene.control.skin" to unnamed module @704921a5
I have in my setting.gradle a
rootProject.name
set. So it should not find it as unnamed? Anyway i try some things from here ..Edit: No, I cannot get it working. Does it work for you?
following i set in my build script
application { applicationDefaultJvmArgs = listOf( "--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED" ) }
though i have in my settings.gradle.kts
rootProject.name = "BootstrapTornadoFX2"
but when i start it complain thatjava.lang.reflect.InaccessibleObjectException: Unable to make protected void javafx.scene.control.skin.VirtualFlow.rebuildCells() accessible: module javafx.controls does not "opens javafx.scene.control.skin" to unnamed module @4fcd19b3
and this error disappears when i open it toALL-UNNAMED
any other suggestions?
applicationDefaultJvmArgs = [
"--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED"
]
works for me
Yeah, seems to be working with JDK11 but not 13, right?