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
    473504
    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

      @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
                              • zencuke
                                zencuke last edited by

                                Still reading the doc. (Actually I connected with the SensorTag and my heart rate monitor first ;-) ) Thanks for Reminders. I didn't realize how much useful functionality (Calendars, Alarms, even geo-location alarms) that included.

                                Reminders question: This may be a limitation in the apple framework but would it be possible to add an action_url to reminder alarms like there is in the notifications module? It would be nice to implement custom behavior when an alarm happens, from snooze to marking a reminder as done or even changing the reminder contents.

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

                                  Reminders question: This may be a limitation in the apple framework but would it be possible to add an action_url to reminder alarms like there is in the notifications module?

                                  No, that's technically impossible. The notifications are entirely handled by the built-in Reminders app.

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

                                    Alright, a few more things I noticed. Some of these were already present in 1.5 or are suggestions, but I suppose it doesn't make any difference now that the beta is available to a few people.

                                    • [major] It is no longer possible for action menu scripts to open input_alerts and such. Instead the script will forever hang and cannot be stopped without killing Pythonista.
                                    • [major] password_alert always returns None.
                                    • [major unless you read the source code] In the documentation for dialogs.form_dialog() there is no mention of the "title" dictionary key.
                                    • [minor] When viewing a non-Python text file it is not possible to edit the action menu list.
                                    • [minor] site builtins copyright, credits, license, exit and quit are missing. (The last two are not very important in Pythonista though.)
                                    • [minor] In the tap-and-hold menu of the console's Clear button, the Clear Output button does nothing.
                                    • [visual] Still no line break after the EXIT (n) output caused by SystemExits.
                                    • [visual] The console ignores sys.ps1 and sys.ps2, and always uses >>> and ... instead.
                                    • [suggestion] Perhaps also add the "New Folder" option to the "create" menu of the file list, so folders can be created without needing to go into edit mode.
                                    • [suggestion] Perhaps make editor scripts available from the "share" button in the console in addition to that in the editor.
                                    • [suggestion] When entering multiline statements (if, def, etc.) in the console, didn't the ">" previously change to "..."?
                                    • [suggestion] When entering multiline statements in the console, change the "play" button to "cancel", so that KeyboardInterrupts can be sent to cancel statements mid-input.

                                    PS - Simple test for console-related bugs:

                                    import console
                                    
                                    def main():
                                        try:
                                            print(console.alert("alert", button1="OK"))
                                            print(console.input_alert("input_alert"))
                                            print(console.password_alert("password_alert"))
                                        except KeyboardInterrupt as ki:
                                            print(ki)
                                    
                                    if __name__ == "__main__":
                                        main()
                                    

                                    Works as a main script, but hangs when added and run as an editor script. Both methods worked fine in 1.5.

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

                                      Are all features that will be included in the final release included in the beta?

                                      It would be nice to have a phone module. And I have been wanting some way to interact with facebook (mainly for editorial).

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

                                        @dgelessus Thanks a lot, some very good points there.

                                        @TutorialDoctor

                                        Are all features that will be included in the final release included in the beta?

                                        Yes. I have more things in the pipeline, but probably not for 1.6.

                                        It would be nice to have a phone module. And I have been wanting some way to interact with facebook (mainly for editorial).

                                        Not sure what you'd expect a hypothetical phone module to do. There isn't much phone-related stuff that is accessible from third-party apps.

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

                                          @TutorialDoctor, you might want to look up tel:// URLs. They are supported by practically all smartphone operating systems, and on iOS I believe they can be used for FaceTime calls on non-iPhones as well. Skype also understands the callto:// protocol, but that appears to be mostly Microsoft-specific. In any case they are normal URLs and can thus be opened using webbrowser.

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

                                            @omz Bug,when archiving a folder to send as an email, the email share sheet is never presented.

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