Issues with Viewport SetContent #374
-
Hey Charm team, thank you for this library as it's been very inspiring and fun to work with! I am working on an IRC client, and having some trouble updating the Viewport component: The Issue In This function,
After this message is received it is processed by a switch statement in
I can't seem to figure it out, but I can print the message contents to the screen, yet setting content in the Viewport does not work as expected. Even with a dummy string (I.e., Could there be a race condition between my message retrieval goroutine and updating the viewport? Thank you in advance for any help and insight! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You shouldn't call |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! That is a great feature. I got it working by sending a message to the tea program:
|
Beta Was this translation helpful? Give feedback.
You shouldn't call
model.Update
directly: either send a message to thetea.Program
or wrap the IRC handling in atea.Command
. Bubble Tea will then handle your messages, callUpdate
and re-render the state of your program.