I think I found the right place for it.
@ui.in_background
def got_input(st) :
theModel.parse(st)
That works in my program too.
Thanks everyone for running such a patient and informative forum.
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.
I think I found the right place for it.
@ui.in_background
def got_input(st) :
theModel.parse(st)
That works in my program too.
Thanks everyone for running such a patient and informative forum.
@cvp well, I just can’t find the right place to put it in my program.
I will have to try another way entirely.
@Tel that seems to do it!!! But I don’t understand it, do you?
@cvp [i was taking a nap for a while] I’ll try that.
There’s obviously a lot I don’t understand about ui.in_background.
So NewLink() has completed. Now if there is a return(result) at the end of NewLink(), after the print, where does it return to?
@cvp that print is just to prove that NewLink has completed before the dialog OK has been pressed. Therefore the dialog did not block.
@cvp of course, but in order to see what’s happening you need to insert
print(NewLink(st))
And you will see the same thing happens.
@cvp so, back to my original point, the dialog should block the return out of Newlink, but it doesn’t. And there is nothing for me to put a wait_modal() on.
@cvp but don’t you see that Newlink return None, before that?
This is the output when I type “This string” in the view
after calling NewLink: None
from parse after dialog: {'name': 'This string'}