Replies: 3 comments 2 replies
-
I'm not clear on what "broadcasting" would do. Sending events to every widget would almost certainly be too expensive. |
Beta Was this translation helpful? Give feedback.
-
I see... how about sending it to every Screen and ModalScreen then? |
Beta Was this translation helpful? Give feedback.
-
In the end what I wanted to achieve with this is to have a way to send messages to Screens of certain classes or IDs. What kind of alternate solutions are available to that? If there is none, how about adding some kind of new way to send messages in a way similar to the query_one method? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be great if there was support for globally broadcasting Events.
Also it would be great if the @work annotation had an option to broadcast its events.
An example use case would be setting up a global loading indicator:
This code currently doesn't run on_worker_state_changed inside the TestApp. It would need to be moved to DummyScreen and duplicated for every Screen, which wouldn't make sense.
Beta Was this translation helpful? Give feedback.
All reactions