<@U78L28DMX> Do you mean "convert" a TornadoFX Typ...
# tornadofx
e
@amanda.hinchman-dominguez Do you mean "convert" a TornadoFX Type Safe stylesheet to a text based css file or the other way around? You can get the resulting css text from a type safe stylesheet by calling
render()
on the stylesheet.
a
convert a type safe style sheet to a text-based css file, yes. When a user uses the GUI to create their page, it should have an existing pre-set stylesheet, but when they edit aspects of the page, the stylesheet also changes. To view those changes, they may access a converted .css file that overrides the master stylesheet (haven't thought what format it will be in, probably .css too). I haven't thought too much further than that
e
OK. At least it's easy to show/render the text based result from a type safe stylesheet 🙂
a
hahaha, that is true! Hey, by the way, is it still acceptable to use the parameter --live-stylesheets for reloadStylesheetsOnFocus? Intellij didn't recognize it, and it's trying to import tornadofx.FX.Companion.stylesheets for just "stylesheets"
e
Something is going on with Slack, I answered this twice in the main channel but the answer isn't visible after I hit enter. Did you see them?
Just to be clear,
--live-stylesheets
is the command line equivalent to calling
reloadStylesheetsOnFocus()
in your code.
And in case slack just ate my messages: You must be running in debug mode for it to work, and you must recompile and give IDEA time to swap out the class before you give your app window focus again. At that point the styles whould be reloaded.