Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
c.view.present('sheet') ValueError: View is already being presented
-
I'm using the
dialogs
module for a share extension. When the extension runs it calls the lineans = dialogs.list_dialog("Go to another app?", [k for k in apps_list])
to show a choice dialog. This did work for a while, but now I get the following error:
line 417, in list_dialog c.view.present('sheet') ValueError: View is already being presented or animation is in progress
Why's that and how can I avoid this?
ps: I remember I experimented with
appex.finish()
(to close the share sheet before the dialog is displayed), but this did not work as I hoped for. So I have eliminated all calls toappex.finish()
, but now I get above error. -
@halloleooo try to call the dialog in a def running in background thread
@ui.in_background def ...(): ans = dialogs.list_dialog("Go to another app?", [k for k in apps_list])
-
Thanks @cvp!
So can I decorate my whole
main()
of the share extension (which includes theans = dialogs.list_dialog
call) with@ui.in_background
? -
@halloleooo i would not do that but I would call a function containing only the dialog and only the function would be decorated