mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
Allow to give a name to for
and if
This commit is contained in:
parent
52e85933ed
commit
42c25248a8
8 changed files with 121 additions and 49 deletions
|
@ -29,5 +29,12 @@ SubElements := Rectangle {
|
|||
self := Rectangle {}
|
||||
// ^error{'self' is a reserved id}
|
||||
}
|
||||
|
||||
if (true) : root := Rectangle {
|
||||
// ^error{'root' is a reserved id}
|
||||
|
||||
for _ in 1 : self := Rectangle { }
|
||||
// ^error{'self' is a reserved id}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,16 @@ Hello := Rectangle {
|
|||
// ^error{Cannot access id 'ccc'}
|
||||
}
|
||||
|
||||
Text { text: ccc.text; }
|
||||
// ^error{Cannot access id 'ccc'}
|
||||
for plop in 0 : named_for := Rectangle {
|
||||
Text { color: named_for.background; }
|
||||
}
|
||||
|
||||
Text {
|
||||
text: ccc.text;
|
||||
// ^error{Cannot access id 'ccc'}
|
||||
color: named_for.background;
|
||||
// ^error{Cannot access id 'named_for'}
|
||||
}
|
||||
|
||||
for aaa in aaa.text: Rectangle {
|
||||
// ^error{Cannot convert string to model}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue