Forum Archive

Pythonista Scripter

DavinE

@mikael, can you maybe help me out...
i try to open an Function over a Button (Tapp) but it sill nothing happens...
i have no idea what's wrong....
i try the hole day to find it....

i don't can reproduce it for an example....
sry :(

maybe you have an idea what it can be...
Thanks a lot!

p.s. That has nothing to do with my other topic.

JonB

You need to post your code! Obvious answers include not setting the button action, or incorrect function signature...

mikael

@DavinE, with no other information, we can only guess. Maybe you are accidentally calling the function when you try to set it?

button.action = func()

And the func by default returns None and no action is actually set?

DavinE

I figured out Whats the issue.....
I used wait_Modal in my function....
This did‘t worked with the @script function...

I do like an workaround.... without wait_Modal and it worked Perfect....

But @mikael i cant Build an example for you to maybe fix this sry :(

Thanks for your help! :)

mikael

@DavinE, so, if I understand correctly, you presented another view with wait_modal, and some scripter script did not work. One reason for that could be that the wait_modal probably stops the update cycle of the view at the bottom, and thus all scripter scripts as well.

If so, and you want to keep the wait_modal, there is an easy workaround - you can start_scripter for the modal view, and then for the old root view again after the modal view is dismissed.

DavinE

@mikael, you understand it correctly ;)
hehe thats a great idea.... but i can't try it because i used an other way and i don't have the "old" version....
maybe it helps other Guys!

But Thanks for your great help here @mikael !