omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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.


    It's like a bug.

    Pythonista
    4
    14
    3450
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tomomo
      tomomo last edited by

      When I execute the code below, I cannot press the OK button.
      Do you have the same symptoms?

      iPhone X(iOS12.4.1)
      Pythonista 3 v.3.2(320000)

      import ui
      main = ui.ScrollView(frame=(0, 0, 375, 812))
      main.content_size = (375, 812)
      wv = ui.WebView(frame=(0, 0,*main.content_size))
      wv.load_url('https://www.google.co.jp/')
      main.add_subview(wv)
      main.present('fullscreen')
      
      wv.evaluate_javascript('alert("123");')
      
      cvp mikael 2 Replies Last reply Reply Quote 0
      • cvp
        cvp @tomomo last edited by

        @tomomo For me, it works
        iPad mini 4 iOS 13.2.3
        Pythonista beta V3.3 build 330018

        1 Reply Last reply Reply Quote 0
        • mikael
          mikael @tomomo last edited by

          @tomomo, works for me as well, on an iPhone with the same screen size and same Pythonista version as yours, but on iOS 13.

          Just to be sure, have you tried restarting your phone?

          1 Reply Last reply Reply Quote 0
          • tomomo
            tomomo last edited by

            I tried rebooting, but I couldn't press the OK button.Is it because of iOS version 12.4.1?

            1 Reply Last reply Reply Quote 0
            • tomomo
              tomomo last edited by

              iPhone 6S(iOS13.2.3)
              Pythonista 3 v.3.2(320000)

              This worked.
              So maybe the iOS version is a problem.

              cvp 1 Reply Last reply Reply Quote 0
              • cvp
                cvp @tomomo last edited by

                @tomomo thus, just to be sure, you see the button and when you tap it, nothing happens?

                1 Reply Last reply Reply Quote 1
                • madivad
                  madivad last edited by

                  Doh! So how do you get out? I had to close down the app. Lol

                  iOS 12.4.1
                  Pythonista 3.3 beta

                  1 Reply Last reply Reply Quote 0
                  • tomomo
                    tomomo last edited by

                    Since you cannot press the OK button, you can only delete the app from the task.

                    How can I use Pythonista 3.3 beta?

                    cvp 1 Reply Last reply Reply Quote 0
                    • cvp
                      cvp @tomomo last edited by

                      @tomomo normally, from here but it seems full now😢

                      1 Reply Last reply Reply Quote 0
                      • tomomo
                        tomomo last edited by

                        Thank you.
                        It ’s full.

                        cvp 1 Reply Last reply Reply Quote 0
                        • cvp
                          cvp @tomomo last edited by cvp

                          @tomomo this works on iPhone 5s iOS 12.4.3
                          Perhaps, you did not wait for the web page to be loaded before doing your alert

                          import ui
                          main = ui.ScrollView(frame=(0, 0, 375, 812))
                          main.content_size = (375, 812)
                          wv = ui.WebView(frame=(0, 0,*main.content_size))
                          wv.load_url('https://www.google.co.jp/')
                          main.add_subview(wv)
                          main.present('fullscreen')
                          
                          def x():
                          	wv.evaluate_javascript('alert("123");')
                          ui.delay(x,1) 
                          
                          tomomo 1 Reply Last reply Reply Quote 0
                          • tomomo
                            tomomo @cvp last edited by

                            @cvp I will try it.

                            cvp 1 Reply Last reply Reply Quote 0
                            • cvp
                              cvp @tomomo last edited by

                              @tomomo and, normally, you should use delegate of WebView

                              import ui
                              
                              class MyWebViewDelegate (object):
                              	def webview_did_finish_load(self, webview):
                              		wv.evaluate_javascript('alert("123");')
                              
                              main = ui.ScrollView(frame=(0, 0, 375, 812))
                              main.content_size = (375, 812)
                              wv = ui.WebView(frame=(0, 0,*main.content_size))
                              wv.delegate = MyWebViewDelegate()
                              main.add_subview(wv)
                              main.present('fullscreen')
                              
                              wv.load_url('https://www.google.co.jp/') 
                              
                              tomomo 1 Reply Last reply Reply Quote 0
                              • tomomo
                                tomomo @cvp last edited by

                                @cvp Thank you for the several amendments.
                                I will try my best to change the contents of the alert dynamically.

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Powered by NodeBB Forums | Contributors