-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic NoSuchProperty
when changing commands
in Path
#5564
Comments
NoSuchProperty
when changing commands
in Path
Thanks for filling a bug report. The bug is because the Path command is a bit of a special property and there seems to be some bug at how it is handled in the compiler. There are some design problem in the Path API that need to be addressed (cf #1742) In the mean time, you can use a temporary property: export component BoxFileSelect {
property <string> state:"none";
property <string> square:"M 0,0 h6 v6 h-6 z";
property <string> first-tick:"M 0,6 l6,-6";
property <string> second-tick:"M 0,0 l6,6";
property <string> the-commands: first-tick second-tick;
TouchArea {
width: 20px;
height: 20px;
clicked => {
if(state=="all"){
state="none";
the-commands=second-tick;
}else{
state="all";
the-commands =first-tick;
}
}
}
Path {
width: 20px;
height: 20px;
commands: square;
stroke: black;
stroke-width: 2px;
}
check:=Path {
width: 20px;
height: 20px;
commands: the-commands;
stroke: green;
stroke-width: 3px;
}
} |
Thank you for the quick response! Your solution works. |
When pressing this custom checkbox, the Slint Language Server crashes. It seems like the commands property for the Path component cannot be updated. I'm using Linux with VS Code.
It would be nice to create a three state checkbox (all, some, none) for nested options...maybe by allowing to modify the current default std-widgets checkbox (?): I see there is discussion #5392 . There is the 3 state option on the web.
The text was updated successfully, but these errors were encountered: