tornadofx: Referring to CSS property in another property causes chain of Exceptions that crashes the app

This CSS object:

class Styles : Stylesheet() {
    init {
        root {
            baseColor = Color.DARKSLATEGRAY
            prefWidth = 300.px
            prefHeight = 120.px
        }
        text {
            stroke = baseColor
        }
    }
}

Causes the app to not start up due to a large chain of Exceptions. I will not even post it as it’s huge and probably won’t help you, just run and see for yourself.

I get that using baseColor in that position may not work due to whatever implementation detail, but it does look to me like it should work, after all baseColor is set and then just used elsewhere later!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Cool, I will have a look. This could definitely be improved.