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
    284124
    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.
    • ihf
      ihf last edited by ihf

      @cvp I was certain I had but I went back to do it again just to be sure before I answered your question. Instead of confirming, I got the following error:

      Traceback (most recent call last):
        File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 1146, in layout
          ws,hs = self.get_screen_size()
        File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 1137, 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 don’t think this has anything to do with the sorting question, since it appears even after I force quit Pythonista and start again.
      cvp 1 Reply Last reply Reply Quote 0
      • ihf
        ihf last edited by

        @cvp I got it to run again and , yes the display I posted is after hitting the sort button

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

          @ihf One of the usual Pythonista crashes for which, I think, my script is not responsible. I'm sorry for you and I would understand that you stop to use this program. It uses almost all internal functionalites of Pythonista, is big, uses a lot of memory, and crashes too much in not reproducible ways.

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

            @cvp I can live with occasional crashes. (Just wish that @omz would reappear or let someone have the source to Pythonista). In any case, does the sort order look right to you?

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

              @ihf did

              yes the display I posted is after hitting the sort button

              I don't think so, the sort button changes from 🔽 to 🔼 after you to it.

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

                @cvp yes, it cycles thru up, down, and numeric.

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

                  @ihf yes, but the image you posted shows the button as 🔽, that will say the next tap will give a descending sort, actual is no sort

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

                    @cvp OK, so the button that shows is not the way it is sorted, but how it would be sorted if you hit the button? Not what I would have expected. However this has just surfaced a different bug. I went back and hit Expand All and the top line of icons is (mostly) gone.

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

                      @cvp but the sort does work (once I realize that the button is showing what will be not what is).

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

                        @cvp it happened a few times, but now I can't reproduce it reliably so I guess it is not worth spending time on.

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

                          @ihf said

                          the sort does work (once I realize that the button is showing what will be not what is).

                          Do you prefer that it should show what the sort is?

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

                            @cvp Yes, I would prefer that but now that I know what it is, I could live with it.

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

                              @ihf V01.23 and outline.versions with

                              Version V01.23
                                - icon of dates sort button now shows the actual sort order, not the order if
                                  button would be tapped
                              
                              1 Reply Last reply Reply Quote 0
                              • ihf
                                ihf last edited by

                                @cvp If my outline is collapsed and I select view by completion date, and then select sort button to change to sort down, the display gets messed up in that lines are overlapping.

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

                                  @ihf

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

                                    @ihf said

                                    If my outline is collapsed and I select view by completion date, and then select sort button to change to sort down, the display gets messed up in that lines are overlapping.

                                    It seems that lines after sort keep height of initial order, I don't understand why because I recompute their height in tableview_cell_for_row delegate

                                    Édit: but I guess that ObjectiveC code of TableView also calls it again. Very annoying.

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

                                      @cvp I am glad to see that you are maintaining a sense of humor. (or at least I hope you are).

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

                                        @ihf said

                                        or at least I hope you are

                                        I also hope it is humor, not instinct

                                        Obviously, I should have to advice: don't collapse, don't sort, don't.....

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

                                          @ihf Version mac_outline_viewer.py V00.04 with

                                            V0.04
                                              - use a dropdown selector to choose which dates to show
                                          

                                          Thanks to you, I have had to use my poor JavaScript and HTML5
                                          Feed-back hoped

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

                                            @cvp I wonder if updates are not being made on the main thread...
                                            https://stackoverflow.com/questions/2318445/uitableview-crashes-if-data-source-is-updated-during-scrolling

                                            You can try beginUpdates() before updating your data (adding or deleting rows) then end updates() after reloading on the tableview ObjCInstance)

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