I have tried Debug mode too and it also doesnot wo...
# tornadofx
h
I have tried Debug mode too and it also doesnot work
e
I'll switch to a thread, to not spam the channel. You also need to tick the "Live View" and "Live Stylesheets" in your TornadoFX Run Configuration to make hot reloading work.
Start the View with Debug, Ctrl+F9, wait for recompile, focus the view and it should reload
But not everything seems to reload. I tried changing the title, this didnt work. However changing some labeltext is working on my side
And I did not use the
reloadViewsOnFocus()
. I just have
override val root = vbox { label("tester blaubb") }
in my
Testapp :View("title")
h
yeah I was on my iphone so could not make this a thread since my last comment
about the option, I tried them too
(live view, live stylesheets, and dump stylesheet)
I think I missed the recompile by Ctrl+F9, trying now
I did tried recompile by right click on the code file though
I did not use the reloadViewsOnfocus() at first, just stock new project template. And I also changed both view title and lable title, and adding new label
Just tried Ctrl+F9 after changing label text, does not work
each time I refocus on the app, I see there's actually a log line saying it is
reloaded
, but the actual app on the screen does not change
I tried gradle/maven, default kotlin version when the project created (1.2.21), latest kotlin version (1.2.40), nothing work
argg, it works now
let me review what I did wrong
e
Sure. Let me know what the issue was. I'm really curious 🙂
h
I think I need the combination of the following for it to work: 1. start with default project template (available after install the tornaldofx plugin) 2. may need to close/reopen that project, making sure that the
TornaldoFx Framework
is configured for the project https://www.dropbox.com/s/8jd8tgttemc258s/Screenshot%202018-04-27%2022.34.10.png?dl=0 3. With the above framework configured, I can easily create a run configuration by clicking on the logo next to MyApp class 4. Now re-configure that one to enable live reload of view/stylesheet: https://www.dropbox.com/s/5nw1q5zngxgbhp0/Screenshot%202018-04-27%2022.34.48.png?dl=0 5. Need to run in Debug Mode 6. Need to recompile the changes (Ctrl+F9)
👍 1
Step [2] and [5] seems to be what I missed