Closed ogoffart closed 1 year ago
Edited the description to keep inheritence
About
component Foo {
property <int> yy : 42;
rect := Rectangle { /* .. */ }
//...
}
Is this equivalent to inheriting from some item class with only common properties?
I think you have eliding of trivial rectangles in the compiler, maybe it would be nice to partly document that behavior so that developers are not tempted to use inheritance to prune their item tree.
@jturcotte: Yes it is exactly that. And you're right we should document that properly.
I suppose that this can be ... closed? :)
We want to change the component declaration so that
Following the discussion in https://github.com/slint-ui/slint/issues/191#issuecomment-938811947 we came up with
So:
component
contextual keyword. (Question: is that the right word, should it beelement
?):=
in component or global declaration