React to a UI element inside `@ui.in_background`
When I put a UI element via
@ui.in_backgroundin the background, how can I react to the result in my normal (foreground) flow?
Say I have
dialogs.list_dialogand I want to do something with the result of the list in my
mainfunction. Can I somehow wait for the result ?
mikael last edited by mikael
@halloleooo, you can use the queue module.
If both the main and background code see the same
my_queue = queue.Queue()(can be global, or passed as a parameter to the bg function), then your bg code can call
my_queue.put(value)and your main code can wait for it with
value = my_queue.get().
Much appreciated your tip. I will try this. :-)
(Very strange though that I didn't not get any email notification about your reply... Does this forum not send emails out???)
mikael last edited by
@halloleooo, unfortunately, all email notifications, including password resets, have been broken for about a year now.
@mikael Good to know. Thanks!
Reacting to a UI element inside a Native UI environment requires intricate handling and seamless integration. Leveraging React's capabilities within the Native UI structure empowers developers to dynamically respond to user interactions, ensuring a fluid and responsive user experience. Careful implementation allows for efficient updates and interactions within the Native UI, enhancing overall usability and functionality.