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.


    Error regarding ui.TableView documentation

    Pythonista
    2
    3
    57
    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.
    • B
      BCX574 last edited by

      Hello.

      I was testing the code while reading the ui.TableView documentation and found what I believe to be a writing error.

      ui Documentation

      It is related to the arguments of the insert_rows and delete_rows methods.

      Here is a quote from the documentation of the problem

      "Each row index in the sequence can be a 2-tuple of numbers (section, row) or a single number. If a single number is given, the first section is assumed."

      The documentation shows the tuples in the order of Section,Row, but this caused an error. On the other hand, the order Row,Section did not cause an error, and the TableView display was updated properly.

      Has anyone else encountered the same problem?

      I am using my own DataSource class instead of the ui module's ListDataSource, so maybe my implementation is wrong.

      I have checked my implementation of tableview_number_of_sections and tableview_number_of_rows many times, though.

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

        Docs for current version are at
        https://omz-software.com/pythonista/docs-3.4/py3/ios/ui.html#tableview

        B 1 Reply Last reply Reply Quote 0
        • B
          BCX574 @ccc last edited by

          @ccc
          Thank you.
          However, the part I quoted seems to be unchanged.

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