Hacker News new | ask | show | jobs
by ealhad 1100 days ago
This looks really neat, I played with it a bit and the DSL is well thought out.

One thing I can't figure though: how do we set default values for internal Struct?

Said default values are mentionned in the documentation (here: <https://slint.dev/releases/1.0.2/docs/slint/src/reference/ty...>).

  // ok even if a is missing, it will just have the default value
1 comments

Currently the default is just whatever empty value for that type (so 0 or "")

But since this is something that was asked before, I created an issue: https://github.com/slint-ui/slint/issues/2936

Neat!