I show a Notification while a background task is created and executed. When the task has finished I hide the notification. So far so good.
Now I want to show an animated gif and update the text to better report on the task’s progress.
What I’ve tried and what’s not working:
I tried changing the notification.text or .message properties. Does not work.
I tried re-creating the notification on each update. Gives the funny effect of the new notification ‘running of the page’
I tried (as for alerts) Notification(content=MyProgressPanel(), title=‘Please wait’, timeout=None)
I tried using an alert. But an alert blocks the rest of the code, IOW the background task is not started.
So, in retrospect, I just want to have a floating form with my now content, which does not block the UI. I want to manipulate the custom content in response to background activity.
There is a blog on building a search engine in the docs which might help you. From memory it launched a background task and then updates the UI form based on the state of the background task. Have you had a look at this?
@stucork Ah so simple?! Thanks.
And I learned that you can have more than 1 role!!
And I learned that you can set the RichText.data property, but that you have to change the whole dict value.
So:
self.form3_1.rich_text_1.data = {'time': self.time, 'other': 'AA'} # OK
self.form3_1.rich_text_1.data = {'time': self.time} # OK-ish but will clear 'other'
self.form3_1.rich_text_1.data['time']='xx' # does nothing