PythonistaKit dialogs.alert() buttons can't be pressed on real iPhone X (but it works in simulator?)
I know PythonistaKit hasn't really seen much attention recently, but this one is strange as it works in the simulator (and on the App Store version of Pythonista).
I'm upgrading by app for iPhone X and for some reason I can't press any of the buttons on a dialog box generated with dialogs.alert(). The dialog can be dismissed by keyboard if it has a text field.
Anyone have any idea what may have changed and what I could do to troubleshoot this?
Tell a lie- It doesn't work in the simulator either. Just doesn't work on iPhone X.
May have to dig down and do some debugging in the code for it
I do not believe this is related to iPhone X, but iOS 11. I have an iPhone 6 Plus. Once I updated to iOS11,
dialogs.alert()broke (and other related dialogs). I know this because I updated to iOS 11 in the middle of this code development and noticed it immediately.
You can have a simple message alert with an Ok button. Once the message comes up, I have to force quit Pythonista because the Ok button is not "clickable". It doesn't even highlight when touched. So it appears the app freezes, but not sure.
For example, this will freeze up...
dialogs.alert('hello world', 'test', 'Ok', hide_cancel_button=True)
@donnieh Hmm, I can't reproduce this. That line works fine here, just tested this both in the App Store version and the beta (on iOS 11).
Is this the entire code that causes the freezing?
Doesn’t seem like iPhone X issue. I just tested this on mine, trying different combinations of buttons and options. All works fine for me
@omz Fair enough. Here is my exact code...
class Home_page: def __init__(self): pass def Info_tap(self, sender=None): dialogs.alert('Opamp Pro v1.0', '\nA circuit rich design calculator for iOS.\n\nDonnie Herman, 2016-2017 \nWestern NY','OK', hide_cancel_button=True)``` If you send me an email, I will reply with entire source code. (I don’t want to post all my code here)
This post is deleted!last edited by
Does it on iPhone 6S and 7 too. Definitely iOS related. Dialogs is definitely broke, but not sure why it works for some people.
I looked up the documentation for dialog.alert, and was directed to look at console.alert.
I found this topic from 3 years ago about a similar hang with console.alert.
console.alert with SceneView
Adding @ui.in_background before the method(s) fixed it!
I used @ui.in_background before but I was threw off by it working, then not working out of nowhere.