Just starting with TornadoFX on Ubuntu 20.04. I in...
# tornadofx
v
Just starting with TornadoFX on Ubuntu 20.04. I installed openjdk11 and followed openjfx instructions on Setting Up page of TornadoFX guide. I created a new tornadofx-gradle-project but project didn't build - nothing showed other than Gradle files. Restarted IDE and that seemed to fix it. But when I try to run the project run task fails. It's my first tornadofx project and I have no idea what I did wrong. I tried to add a run config of TornadoFX but I can't add the app or view class in it. Choose app class doesn't seem to recognize the classes. Thank you in advance.
Progress. I fiddled around a bit (ok a lot) and now I have Run TornadoFX icons showing up in App and View classes in sidebar. But when I click on that, I get error that JavaFX runtime components are missing. I though the Gradle additions suggested in TornadoFX guide would take care of that.
Success! I was finally able to run the project with Gradle run config.
m
if you used the TornadoFX wizard to create a new gradle based project then you'll end up with problems, the default gradle config it creates is broken
v
I did use the wizard in IDEA. What's the recommended way to create the project?
m
The way I do it is create a kotlin gradle project from the Intellij wizard then update it for tornadofx
v
I see. To add TornadoFX to project post, is there anything else other than adding TornadoFX dependency in Gradle build file?
take a look at my answer there for what I found wrong with the setup generated by the tornadofx wizard
It's been a while since I've done it, but I think that's all you need is to add the tornadofx dependency
I started with JavaFX and changed my build.gradle from that to include kotlin and tornadofx
v
I'll try creating a project in that manner then. Thanks Richmond, I mean Marshall. 🙂
m
Hey hey! Somebody knows who my avatar is 😄
You are the second person
Something else to watch out for, when you create a tornadofx app you will have a "fun main()" in the root of some file that will launch the App class
you need to make sure your gradle config uses "package.ClassFileWithMainKt" as the mainClassName
Notice the Kt part, kotlin creates a standalone class file to hold the main function and appends Kt to the name
v
Of course I know. Big fan. Like Moss would say "I like being weird. Weird is all I got.". 🙂 And thank you for all the tips and the repo. I'm dipping my toes into TornadoFX and all of this information is very helpful.
m
I have a shirt with "I like being weird" on it :)
❤️ 1
No problem, been doing some heavy development with TornadoFX so feel free to ask any time
v
I thought you'd have one with Goth2Boss. 😄
There. Now this conversation makes more sense.
m
hah
nice