I currently have a tornadofx app that I'd like to ...
# compose-desktop
b
I currently have a tornadofx app that I'd like to gradually move to compose. Is there a way to make them play together nicely?
z
I don't know anything about TornadoFx but just skimming the front page of the website it looks like is has its own transactional state system? That interop could be fun to build 😄
I'm guessing there might be two fundamental interop points: converting between state systems and plugging into whatever view system it's using under the hood - javafx? I'm not aware of any compose integration there but if someone's done it you could probably wrap a tornado api around that
b
Yep, JavaFX. It has it's own GUI thread and only wants to run inside a subclassed Application. Tornado is just a kotlin API sitting on top of it.
z
Looks like JavaFX interop is not officially planned but possible: https://github.com/JetBrains/compose-jb/issues/280
b
Thanks @Zach Klippenstein (he/him) [MOD]! I had found this, but didn't have the mental bandwidth to fully understand what was going on there. Though, this looks like I'd need to have Compose running at the top level and embed JavaFX components whereas I'd really need to be able to embed Compose components inside a JavaFX application. But, this could be a good starting point to explore how to do that...
z
It comes down to swing interop I think - if you can put a swing component in Java fx, you're good
I found all the pieces for this just getting some errors trying to fit them all together