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.


    Pythonista 1.6 Beta

    Pythonista
    55
    301
    444728
    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.
    • omz
      omz last edited by

      @techteej Similar to console alerts, dialogs don't work from the main UI thread (allowing this would essentially lead to a deadlock). Try decorating your but_action function with @ui.in_background.

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

        Found a bug. In the UI Editor when delete enabled is off, you can still delete rows in a table.

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

          Will dialogs allow me to create tables with cells (rows and columns)?

          This would be most useful, otherwise I don't see an advantage to dialogs over UI.

          Pinch to zoom in the UI editor would be nice too, as well as saving UI control presets.

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

            The beta doesn't seem to ask for permission to use Location Services when using the location module for the first time.

            I thought it might be for all required permissions, but the Reminders seems to work fine.

            Anyone have any ideas on this?

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

              Found a bug. In the UI Editor when delete enabled is off, you can still delete rows in a table.

              I can't reproduce this. Note however that the "delete enabled" attribute only applies to the default ListDataSource that gets created as a convenience when loading a TableView from a pyui file. If you set a different data source after loading the view, it doesn't have an effect.

              Will dialogs allow me to create tables with cells (rows and columns)?
              This would be most useful, otherwise I don't see an advantage to dialogs over UI.

              No. For the most part, dialogs doesn't really let you do things you couldn't do with the ui module, but things like form_dialog would require a lot more code when done with ui directly. There are also some things that you couldn't do otherwise, like dialogs.import_file() or dialogs.share().

              The beta doesn't seem to ask for permission to use Location Services when using the location module for the first time.

              Are you sure that you didn't give permission with the previous version? The beta would inherit those permissions (it's the same app after all).

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

                I uninstalled the beta, installed the current App Store version and ran a simple get location script. It prompted for Location permissions and retrieved my location.

                I then uninstalled the App Store version, installed the beta again and ran the script.

                The script prints out the value of location.get_location(). It is currently printing out None in the beta with no prompt to allow access to Location Services.

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

                  Bluetooth LE? Bless you! I'd love to beta test that. Sending email as soon as I track down your email address ;-)

                  -steve (aka zencuke)

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

                    @andymitchhank Hmm, that does sound like a bug indeed. Which version of iOS are you using?

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

                      8.1 on an iPad 3 and iPhone 6 Plus. Both are having the same issue.

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

                        @andymitchhank Thanks, I've been able to reproduce the issue. Apparently this has to do with some new requirements for location permissions in iOS 8, looking into it.

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

                          I am still working on reproducing an issue that occurs in one of the callbacks in the cb module. What happens is some kind of heap corruption when I call functions in other modules. I was writing some code that used str.append() and getting all kinds of wierd behavior. It looks like either heap corruption or blown stack.

                          Trouble started when I modified the code trying to print out returned values in a characteristic. I used (print c.value.encode('hex')) in two callbacks and it did not "work". The program just printed nothing but also just returned from the callback and stopped working.

                          I could use a few hints on how to get a good repro case. I could post my code, but the effect is random and the code needs to access a specific device. Any ideas on how to stress the heap or stack in this callback environment would be appreciated.

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

                            And how does one find OMZ's e-mail address? happy to help.

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

                              Click on the word "email" in the very first post in this thread... It is a hyperlink.

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

                                ui.TableView.row_height seems to always be -1 for me. This is new behavior. I can provide repro code if you need it.

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

                                  Trying to make a table action so when you select a row it checks off the reminder, is this how that logic would work?

                                  def picked(sender):
                                  	r.title = sender.data_source.items[row]
                                  	if r.title in reminders.get_reminders(completed=False):
                                  		print 'good'
                                  	r.completed = True
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • omz
                                    omz last edited by

                                    ui.TableView.row_height seems to always be -1 for me. This is new behavior. I can provide repro code if you need it.

                                    Thanks, should be fixed in the build after the next one (already uploaded that).

                                    Trying to make a table action so when you select a row it checks off the reminder, is this how that logic would work?

                                    I can't see where r is coming from in that example and why you would set its title when you actually want to set its completion state.

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

                                      Sounds great! Just send you an email (or two--sorry)

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

                                        @techteej Here's a very simple example of a table view UI to check off reminders:

                                        import reminders
                                        import ui
                                        
                                        def table_action(sender):
                                        	item = sender.items[sender.selected_row]
                                        	r = item['reminder']
                                        	r.completed = True
                                        	r.save()
                                        	del sender.items[sender.selected_row]
                                        
                                        def main():
                                        	v = ui.TableView()
                                        	v.frame = (0, 0, 500, 500)
                                        	v.name = 'To Do'
                                        	all_reminders = reminders.get_reminders(completed=False)
                                        	items = [{'title': r.title, 'reminder': r} for r in all_reminders]
                                        	data_source = ui.ListDataSource(items)
                                        	data_source.action = table_action
                                        	v.data_source = data_source
                                        	v.delegate = data_source
                                        	v.present('sheet')
                                        
                                        main()
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • zencuke
                                          zencuke last edited by

                                          Has anyone else seen this.

                                          I can't install 1.6 because when I click on "Open in Testflight" when reading the apple invite email in gmail it insists on opening iTunes on the Testflight page. When I click on "OPEN" Testflight then says I have to click the link in the email. Has anyone else been able to install from gmail? Is this a gmail bug? I haven't configured apple email so I can't click the link from there.

                                          Any suggestions?

                                          Edit: Solved it. It was Chrome. Gmail launches Chrome to resolve urls. It required cut and paste of the link from Crome to Safari.

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

                                            @zencuke Maybe try copying the link from Gmail and then pasting it in Safari?

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