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.
Problem when running a ui program from shortcut.
-
@satsuki.kojima my solution is correct, I think, if you leave Pythonista by opening another app, like you asked.
-
@cvp
I closed all the tab of my script, and now it works all fine so far. -
@cvp I think the singleton view approach in that thread would work, with modification -- basically as part of the launch, it would close and reopen the view ( or reinitialize it). Haven't tried it myself.
-
@JonB good idea. @satsuki-kojima you could try
-
@JonB
Excuse my slow response. I knew, advised by you, that the same discussion was held in this forum 2 years ago. There were many ideas in that discussion as well although I haven't been all through this yet.
I am very new to singleton approach and my understanding is that singleton pattern can be implemented in one running program. Am I right? If I run my program twice and create a thread in each program, then those threads have to be different threads(different instances,) I think.
Given many ideas, I'll keep posting for any update. Thank you so much.@cvp
Your solution seems working. Mysterious behavior (which I described) may be caused by my impatient testing. (run a program, close Pythonista, run a program again with no break but only clicking the shortcut icon etc.) -
Again, I'll caveat that I haven't run this, but @TPO's code could be modified to return
lock_view
fromis_active
, then you could simply close and relaunch the view. Or, if the view is already active, you could reuse the view, and just replace all the subviews.I'll have to experiment with it.
-
-
This post is deleted! -
@satsuki.kojima don't worry, this user has posted in the last 10 topics, everybody saw it.
-
Thank you for your help. vidmate download instasave