are there some tool to preview the view rather than start the tornadofx application?
No, there is not, but you can in many cases turn on live views and see the ui update as you recompile.
No, there is not, but you can in many cases turn on live views and see the ui update as you recompile.
@edvin
How to turn on live views?Could you tell more detail?
get it,thanks!
@edvin
Following is the way to use the alive view.
1.add this code in the app class
class MyApp: App(MainView::class,Styles::class){
init {
reloadViewsOnFocus()
}
}
2.use the debug mode to start the tornadofx application
3.change your view code,press Ctrl+F9 to rebuild the application,then go back the application,you can see the view is changed
You really don't want that setting in your app when it's distributed to users, so it's better to use the command line parameter --live-views. The TornadoFX plugin can add this command line parameter for you, all you need to do is check the checkbox in the run configuration.
You really don't want that setting in your app when it's distributed to users, so it's better to use the command line parameter
--live-views. The TornadoFX plugin can add this command line parameter for you, all you need to do is check the checkbox in the run configuration.
I have a try your suggestion and it works
Most helpful comment
You really don't want that setting in your app when it's distributed to users, so it's better to use the command line parameter
--live-views. The TornadoFX plugin can add this command line parameter for you, all you need to do is check the checkbox in the run configuration.