-
Notifications
You must be signed in to change notification settings - Fork 639
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
focus()
in init
of a conditional panics
#7617
Comments
I got this example to trigger the problem right away with a few lines less: import { LineEdit } from "std-widgets.slint";
export component StringEdit {
init => {
editor.focus();
}
editor := LineEdit { }
}
export component EditWindow inherits Rectangle {
in property <bool> current-cell;
HorizontalLayout {
if (current-cell): StringEdit { }
}
}
export component Spreadsheet inherits VerticalLayout {
private property <bool> current-cell;
init() => {
root.current-cell = true;
}
EditWindow {
current-cell: current-cell;
}
} The |
Smaller reproducer: export component Spreadsheet inherits HorizontalLayout {
if true: FocusScope {
init => {
self.focus();
}
}
} I think the layout's geometry instantiate the |
focus()
in init
of a conditional panics
Depressing how much smaller you got the example :-) I hope my attempt at least helped a bit. |
Oh yes it did, thank you for reducing the example. I didn't even try working with the original. |
Bug Description
clicking on the cells of this spreadsheet should bring up different interfaces depending on the type of data.
clicking on the "favorite" items brings up a checkbox
clicking on anything else crashes
2025-02-11 21:24:13.587 slint-lsp[5391:16758825] +[IMKClient subclass]: chose IMKClient_Modern
2025-02-11 21:24:13.587 slint-lsp[5391:16758825] +[IMKInputSession subclass]: chose IMKInputSession_Modern
thread 'main' panicked at /Users/runner/work/slint/slint/internal/core/properties.rs:523:9:
Recursion detected
note: run with
RUST_BACKTRACE=1
environment variable to display a backtrace[Info - 9:24:15 PM] Connection to server got closed. Server will restart.
true
The Slint Language Server crashed. This is a bug. Please open an issue on https://github.com/slint-ui/slint/issues
[Error - 9:24:15 PM] Server process exited with signal SIGABRT.
Inconsistency: expected [Identifier], found Node(SyntaxNode { node: [email protected], source_file: "/Users/szecket/Documents/dev/slint-ui/slint/tools/lsp/ui/components/spreadsheet.slint" })
Reproducible Code (if applicable)
Environment Details
nightly + PR #7540: runtime_properties
Product Impact
No response
The text was updated successfully, but these errors were encountered: