Skip to content

TabWidget - Tab callback to update contents #3001

Answered by Vadoola
JohnnyWulgaru asked this question in Q&A
Discussion options

You must be logged in to vote

I believe you just need to mark the callback as pure as below:

export component Demo inherits Window {
    pure callback my_callback(bool) -> color;
    my_callback(x) => { debug("HELLO", x); white; }
    background: my_callback(touch.has-hover);
    touch := TouchArea {  height: 50%;  }
}

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Vadoola
Comment options

Answer selected by JohnnyWulgaru
@JohnnyWulgaru
Comment options

@mrpew
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants