slint
slint copied to clipboard
`@children[<NUMBER>]` to index into the `@children` array
We want to make @children more useful.
While we got stuck with naming children, we all agreed that indexing into the "array" of @children makes sense.
I plan to implement this.
I want the compiler to support @children[x] where x is a NumberLiteral. This is the simplest possible use case and several @children[x] are allowed in a componant.
-
The first child will be
@children[0], to stay compatible with array indices in slint. -
If
x@children[...]are used in a component, then- you must have one
@children[y]for all y in[0; x[ - you must provide exactly
xchildren when using the component.
- you must have one