mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-03 07:04:34 +00:00
Change the syntax of structures to require the struct keyword
This commit is contained in:
parent
333c96fd79
commit
d3801e26d3
12 changed files with 96 additions and 80 deletions
|
@ -89,9 +89,9 @@ Hopefully this should be self explainatory. Check out the documentation of the l
|
|||
// file: my_application_ui.60
|
||||
import { CheckBox, Button, ListView, LineEdit } from "sixtyfps_widgets.60";
|
||||
|
||||
export TodoItem := {
|
||||
property <string> title;
|
||||
property <bool> checked;
|
||||
export struct TodoItem := {
|
||||
title: string,
|
||||
checked: bool,
|
||||
}
|
||||
|
||||
export MainWindow := Window {
|
||||
|
|
|
@ -22,9 +22,9 @@ in lexicographic order.
|
|||
For example, if you have this structure in the .60 file
|
||||
|
||||
```60
|
||||
export MyStruct := {
|
||||
property <int> foo;
|
||||
property <string> bar;
|
||||
export struct MyStruct := {
|
||||
foo: int,
|
||||
bar: string,
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue