Skip to content

Buttons with functions that return values? #3166

Answered by faide
tataDan asked this question in Q&A
Discussion options

You must be logged in to vote

fmt.Println(x) is executed before your callback function is called (when the button is actually pressed by a user).

This is the reason you do not see anything. At the moment fmt.Println(x) is executed x is still equal to its initial value of ""

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by andydotxyz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants