Skip to content

Cannot get the input value when using textinput #160

Answered by muesli
josark2005 asked this question in Q&A
Discussion options

You must be logged in to vote

At a first glance your code probably works fine, but after p.Start you're retrieving the input from the initial model, which will always remain empty: it gets replaced by a new model every time Update gets called. You can either let Update operate on a pointer-receiver, so you keep modifying your original model, or implement another way to store the final value before calling tea.Quit.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@josark2005
Comment options

Answer selected by bashbunni
Comment options

You must be logged in to vote
2 replies
@josark2005
Comment options

@aureq
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
3 participants
Converted from issue

This discussion was converted from issue #159 on May 28, 2022 14:51.