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.
Dialogs.list_dialog is no longer blocking with IOS15.2.1
-
After some search in this forum I get to the conclusion that my issue might be a new one.
I did a vocabulary trainer with an ui.view to display labels and buttons of some kind.
One of these buttons calls an ui.list_dialog, where I can choose from a list of strings. The dialogue used to block the underlying view, so I could retrieve the selected string in the following line of code.
After updating my IPhone to IOS15.2.1 this is no longer true.
This is a very short code to demonstrate my problem# coding: utf-8 import dialogs import ui class my_view(ui.View): def __init__(self): self.background_color='#ffffff' btn = ui.Button(title='Okay',action=self.action) self.add_subview(btn) self.lbl=ui.Label(text='None') self.lbl.y=btn.y+20 self.add_subview(self.lbl) def action(self,sender): act=dialogs.list_dialog('select',['A','B']) #next line is executing before dialogue closed self.lbl.text= act if __name__ == '__main__': v = my_view() v.present('full_screen') ```
-
@WilliD55 Not sure it is relative but the line "self.lbl.text= act" is not correctly indented
Anyway, I don't have any problem on my IPad iOS 15.2.1
If you have the problem try
@ui.in_background def action(self,sender):
-
@cvp : this line did the change with the example code as well as with my application.
Thanks a lot -
@WilliD55 You're welcome in this forum