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.
ui.View Update
-
@mikael , Iโve got a simular problem ! My animations with calls to scripter only works one time ๐ข. I need to restart Pythonista !
I take this opportunity to thank you for your fantastic modules. iPadOS 14.3 beta on iPad mini 4 -
@DavinE, Enez, looks like the PyPI version had a bit of a globals issue, should be fixed now.
-
@mikael , unfortunately, the problem persists ! Do I need to reinstall something ?
-
@Enez-Houad, did you
pip update pythonista-scripter
? And maybe restart Pythonista to force re-import? -
@mikael, Yes, Iโve updated Scripter (even uninstall and reinstall) and restarted Pythonista. And nowโฆ it works the first time, doesnโt the second and crash the third !
-
@Enez-Houad, anything you could share so I can reproduce/fix?
-
@mikael, here is a simple example:
import ui from scripter import script from anchors import dock, size_to_fit, attach mainview = ui.View(name='scripter_view', bg_color='black') Label_1 = size_to_fit(ui.Label(name='Label_1', bg_color='red', text='nothing will happend')) dock(Label_1).top_center(mainview) Label_2 = size_to_fit(ui.Label(name='Label_2', bg_color='red', text='nothing will happend')) attach(Label_2).below(Label_1) Label_3 = size_to_fit(ui.Label(name='Label_3', bg_color='red', text='nothing will happend')) attach(Label_3).below(Label_2) @script def test(): Label_1.text = 'okay' Label_1.bg_color = 'green' yield 2 Label_2.text = 'okay' Label_2.bg_color = 'green' yield 2 Label_3.text = 'okay' Label_3.bg_color = 'green' yield if __name__ == '__main__': mainview.present('fullscreen') test()
the fist time it works perfect...
then close the view and reopen the view... nothing will happened..
you need to reopen Pythonista.hope this will help you out
-
@DavinE, could not find a better way to make this reliable than requiring an explicit call to
start_scripter
, see example below (requires update).import ui from scripter import script, start_scripter mainview = ui.View(name='scripter_view', bg_color='black') start_scripter(mainview) ...
-
@mikael, Perfect ๐๐๐๐
Thank you very much, I would find it hard to do without Scripter! -
@mikael said:
@DavinE, could not find a better way to make this reliable than requiring an explicit call to
start_scripter
, see example below (requires update).import ui from scripter import script, start_scripter mainview = ui.View(name='scripter_view', bg_color='black') start_scripter(mainview) ...
@mikael, It works Perfect!
Thanks for your help and work into it!