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
    589
    180510
    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 @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
                                      • cvp
                                        cvp @ihf last edited by cvp

                                        @ihf The only difference I could see between your two devices is their speed, if you are running really on the two devices an edited script. I thought you used a shortcut to start the Pythonista script via its url scheme, and in this case you may run a not edited script.
                                        You did not answer if the script is stored in iCloud or in a local folder. If it is in iCloud, the first device which will download the new version from GitHub to an iCloud folder would have done the job for the second device.
                                        Anyway, I would prefer that you don't restart the script without restarting Pythonista it-self becuse, as explained in my previous post, if the new version changes code of a created ObjectiveC class, you need to restart Pythonista to use the updated code.

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

                                          @cvp The script is local on both devices and the outlines are on iCloud. On the newer iPad Pro, watch time I run v 1.20 it says that v1.21 is available and then says it is downloaded and after I restart the script, it repeats. Restarting Pythonista does not help.

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

                                            @ihf do you use on your boTh devices the outline.py script in a Pythonista tab or do you use a shortcut to run the script? I could understand that Pythonista has problems to replace an edited running script, although on my iPad I don't have any problem. Sorry, but I am completely in the fog.

                                            My code to replace the running script by a new one is

                                            			url = 'https://raw.githubusercontent.com/cvpe/Pythonista-scripts/master/Gists/outline.py'
                                            			data = requests.get(url).content
                                            			with open('outline.py', mode='wb') as out_file:
                                            				out_file.write(data)
                                            			del data
                                            

                                            But if I set an un existing url, the code runs without error and thus does not replace the script.
                                            Perhaps does the problem come from this.

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