Replies: 1 comment
-
As I see it, builtin messages are used by widgets to bubble up events such as More generally, event-related Python packages follow Observer/Publish-subscribe patterns (there is a dispatch/message bus object in the latter case). For example, your UI code responsible for displaying |
Beta Was this translation helpful? Give feedback.
-
Hi,
I really love the Textual! One thing I would like to understand better is message passing.
There are not many examples really and I did not find documentation. From the discussions and the Calculator example it is more or less clear how to pass messages between widgets. What I would like to know is how to pass messages into the Textual App from the outside? I.e. when Textual is only a frontend for a bigger application, possibly running multiple threads.
For example, I have a thread that processes some data, and when it's done, I would like it to be displayed. I would like to understand how to pass a message with data to be displayed into the Textual App and then channel it to a proper Widget that will render it.
Is there any examples that would show proper ways of doing that?
Beta Was this translation helpful? Give feedback.
All reactions