Skip to content
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

Bug - Slint Server Crashed when trying to call function from States #5246

Closed
Areopagitics opened this issue May 16, 2024 · 2 comments · Fixed by #5312
Closed

Bug - Slint Server Crashed when trying to call function from States #5246

Areopagitics opened this issue May 16, 2024 · 2 comments · Fixed by #5312
Labels
a:compiler Slint compiler internal (not the codegen, not the parser) bug Something isn't working

Comments

@Areopagitics
Copy link

Thanks Devs for your work!
I'm using Slint on Linux with the Visual Studio extension. It obvious that the error is root.animate: 30px; . I just need to restart the editor for the Slint extension to work again. On another note... is there a way to call a function from states?

Here is the code that creates the issue:

component Ball inherits HorizontalLayout{
    in property <bool> replaceAll: false;
    property <bool> replaceable: true;
    in property <string> name:"";
    spacing: 10px;
    height: 30px;
    animate height { duration: 300ms; easing: linear; delay: 200ms;}


    function animate() {
  
        root.height = 0px;
        
    }

    states [
        replaced when replaceable && replaceAll: {
            root.height: 50px;
            root.animate: 30px;
        }
    ]   
}
@hunger hunger added bug Something isn't working a:compiler Slint compiler internal (not the codegen, not the parser) labels May 16, 2024
@ogoffart
Copy link
Member

Thanks for the bug report!

Fixing in #5312

@ogoffart
Copy link
Member

is there a way to call a function from states?

Not at the moment, no.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:compiler Slint compiler internal (not the codegen, not the parser) bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants