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.


    Outliner with drag/drop reordering - part 2

    Pythonista
    9
    594
    181452
    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.
    • cvp
      cvp last edited by

      @ihf V01.19 and outline.versions with

      Version V01.19
        - correction of bug "only on iPhone in portrait mode, editing the last line
          of a file bigger than a screen, the keyboard appears but hides this line"
      
      1 Reply Last reply Reply Quote 0
      • smh
        smh last edited by

        @cvp + @ihf What a great project! Trying to get V01.19 working on M1 MacBook Air, and below is the traceback, any ideas? Also, does using emoji break bullets/cause weird line break issues for other users? Keep up the great work!

        "
        Traceback (most recent call last):

        File "/Users/<myusername>/Library/Group Containers/group.pythonista/Pythonista3/Documents/outline.py", line 97, in <module> load_ framework('EventKitUI')

        File "/var/folders/tx/f122pq090xx2zc5ww_gtz0380000gn/X/3DCFE7F7-3144-5458-A0BE-545898853219/d/Wrapper/Pythonista3.app/Frameworks/Py3kit.framework/pylib/site-
        packages/objc_util.py", line 934, in load_framework

        return NSBundle.bundleWithPath_('/System/Library/Frameworks/%s.framework' % (name,)).load()
        AttributeError: 'NoneType' object has no attribute 'load'

        "

        cvp 2 Replies Last reply Reply Quote 0
        • cvp
          cvp @smh last edited by cvp

          @smh said:

          load_framework('EventKitUI')

          I don't know why this line could give a problem on a Mac, sorry

          You could try without this line, sometImes the framework is loaded by default

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

            @smh said:

            does using emoji break bullets/cause weird line break issues for other users?

            I don'T understand, sorry

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

              @cvp if I open one of my outlines that has about 14 lines in it and I position the cursor to the end of the first line the keyboard comes up but the outline is pushed up such that the insertion point is no longer visible. This is on an iPhone in portrait mode.

              cvp 2 Replies Last reply Reply Quote 0
              • cvp
                cvp @ihf last edited by

                @ihf just tested and I see. What is weird is that if you scroll and retry to put your cursor at first line, the problem does not occur anymore. Annoying, I hate this kind of bugs

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

                  @cvp there is a problem when I type a long line (at least on the iPhone in portrait mode). When I get to the right side of the screen, the line is continued on the next line but the insertion point goes away (although the keyboard is still visible). In other words, I can’t type a line that has the automatic returns in it unless I position the insertion point after the word that has been moved to the next line.

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

                    @ihf said:

                    if I open one of my outlines that has about 14 lines in it and I position the cursor to the end of the first line the keyboard comes up but the outline is pushed up such that the insertion point is no longer visible. This is on an iPhone in portrait mode.

                    That happens only the first time when the keyboard is not yet appeared and my program does not know its height and the foreseen process to automatically scroll up to show a line under the keyboard is executed when it should not. Annoying, I'll check if I can correct it quickly.

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

                      @ihf V01.20 and outline.versions with

                      Version V01.20
                        - correction of bug "before the keyboard has appeared a first time,
                          the first edited outline is automatically scrolled up erroneously"
                      

                      For your information, I get the keyboard height in keyboard_frame_did_change but this function is only called when the keyboard appears. I need to know this height because if you edit a row that would be hidden by the appearing keyboard, the row needs to be automatically scrolled up above the keyboard. But if you edit a row before the keyboard has appeared the first time, this height is not yet known. Thus I force the keyboard to appear and immediately be dismissed without we see it by creating, edit, end, delete a TextField during the general ui.View initialization. Magic, isn't it ?

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

                        @cvp Thanks for the quick fix to the scrolling problem. The lost insertion point on long lines that i mentioned above also occurs on the iPad in landscape mode.

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

                          @ihf said

                          there is a problem when I type a long line (at least on the iPhone in portrait mode). When I get to the right side of the screen, the line is continued on the next line but the insertion point goes away

                          I've seen that, and also on iPad as you said.

                          And you added

                          although the keyboard is still visible

                          Sure of that? For me, keyboard disappears

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

                            @cvp I just tested it again on the iPhone and confirmed that the keyboard remains visible although the insertion point disappears.

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

                              @cvp Probably an old Pythonista problem, but I just started a new outline entered three lines and then hit enter and Pythonista crashed.

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

                                @ihf said

                                Probably an old Pythonista problem, but I just started a new outline entered three lines and then hit enter and Pythonista crashed.

                                Unfortunately, this does not seem to be in my hands

                                But, anyway, try to check the reason in objc_exception.txt or faultlog folder

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

                                  @ihf V01.21 and outline.versions with

                                  Version V01.21
                                    - correction of bug "when typing a long line automatically splits the line,
                                      the keyboard sometimes disappears and cursor is no more visible"
                                  

                                  As I can't reproduce your problem (in my case, keyboard disappears), perhaps this correction does not solve your bug (but only mine). Please, give me some feedback

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

                                    @cvp I tested v1.21 on the iPad and the keyboard remained visible (although it seemed to go away and come right back). So that seems to be fixed (I will test on the iPhone). However, I had a different (new?) problem. I added an item and then tried to move it by holding and dragging it. It looked like it was working, but when I released it, I got an error. Here is the traceback:

                                    Traceback (most recent call last):
                                      File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 3199, in tableview_cell_for_row
                                        v = MyInputAccessoryView(row)
                                      File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 476, in __init__
                                        self.width = mv.get_screen_size()[0]			# width of keyboard = screen
                                      File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 1132, in get_screen_size
                                        app = UIApplication.sharedApplication().keyWindow()
                                      File "/var/containers/Bundle/Application/8778D1CF-1C08-48BA-9714-9D2CFE524EA1/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/objc_util.py", line 801, in __call__
                                        ordered_args = list(args) + [kwargs[key] for key in kwarg_order]
                                    TypeError: 'builtin_function_or_method' object is not iterable
                                    
                                    cvp 1 Reply Last reply Reply Quote 0
                                    • cvp
                                      cvp @ihf last edited by cvp

                                      @ihf said

                                      Traceback (most recent call last):
                                      File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 3199, in tableview_cell_for_row
                                      v = MyInputAccessoryView(row)
                                      File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 476, in init
                                      self.width = mv.get_screen_size()[0] # width of keyboard = screen
                                      File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 1132, in get_screen_size
                                      app = UIApplication.sharedApplication().keyWindow()
                                      File "/var/containers/Bundle/Application/8778D1CF-1C08-48BA-9714-9D2CFE524EA1/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/objc_util.py", line 801, in call
                                      ordered_args = list(args) + [kwargs[key] for key in kwarg_order]
                                      TypeError: 'builtin_function_or_method' object is not iterable

                                      I already got that, not reproductible. Not in my code. I personally think that Pythonista has a lot of problems with iOS/ObjectiveC next versions. Sorry for you, but one more time, I think it is not in my hands.

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

                                        @cvp I am not sure what to make of this but I am testing on an iPad and the auto update does not seem to work properly. When I start the script it tells me there is a new version and asks whether I want to update. I say yes and it comes back and says the update was done and to restart the program and I restart it as I do on my other devices. However the update does not seem to take and it goes through the same cycle again. This happened with the previous release and I thought that I would just do a manual update to 1.20 but it is now happening again with 1.21. It’s obviously not a big deal as I can always do the manual update but I thought I would mention it.

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

                                          @ihf said

                                          I am not sure what to make of this but I am testing on an iPad and the auto update does not seem to work properly. When I start the script it tells me there is a new version and asks whether I want to update. I say yes and it comes back and says the update was done and to restart the program and I restart it as I do on my other devices. However the update does not seem to take and it goes through the same cycle again. This happened with the previous release and I thought that I would just do a manual update to 1.20 but it is now happening again with 1.21. It’s obviously not a big deal as I can always do the manual update but I thought I would mention it.

                                          Is your outline.py local or on iCloud, I got tHe same problem, only once, but my script is on iCloud and download from GitHub to iCloud was done but perhaps not yet to your local device.

                                          If your script is in your local Pythonista, was it edited in a Pythonista tab or run from a shortcut?
                                          When you restart, do you remove Pythonista from memory first? If no, not sure Pythonista does not have a cache.

                                          It is always better to remove it from memory because if the script changes in some created ObjectiveC classes, they are not replaced without restarting Pythonista it-self.

                                          Are you waiting some time before to restart?

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

                                            @cvp I have 2 iPads and on the old iPad Pro, the auto update always works. (I run Outline.py that is in a tab, it asks if I want to download, I say yes, and I get a message saying the download completed and I restart the program. After I restart I am running the new version (I don't even have to quit Pythonista, just the script). On the newer iPad, I do the same exact thing except that when I restart the program it has not been updated. Weird.

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