mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00

Just ignore the case where focus has more argument that planed as it has been reported as an error earlier. Also fix the error message for calling member function with the wrong number of argument to not include the base in the count. Fix #4883
22 lines
No EOL
595 B
Text
22 lines
No EOL
595 B
Text
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
|
|
|
|
|
|
|
|
export component WrongFocus {
|
|
|
|
fs := FocusScope {}
|
|
|
|
ta := TouchArea {
|
|
clicked => {
|
|
fs.focus(0);
|
|
// ^error{The callback or function expects 0 arguments, but 1 are provided}
|
|
ta.focus();
|
|
// ^error{focus\(\) can only be called on focusable elements}
|
|
ta.focus(0);
|
|
// ^error{The callback or function expects 0 arguments, but 1 are provided}
|
|
}
|
|
}
|
|
|
|
|
|
} |