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.


    The performance of button.name is kind of slow?

    Pythonista
    3
    61
    20817
    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 @Guest last edited by

      @lpl ok, but remember, I didn't say textview but TableView which is a scrollview thus you can get the position of the scroll bar

      ? 3 Replies Last reply Reply Quote 0
      • ?
        A Former User @cvp last edited by

        @cvp Sorry. I wrote another word. I understood that, but I'm not a native speaker so sometimes I may wrote the wrong word.

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User @cvp last edited by

          @cvp So, since I use the same strategy in ebook and index. Why there are some white parts when I display the index, and ebook reader looks well?

          cvp 1 Reply Last reply Reply Quote 0
          • ?
            A Former User @cvp last edited by A Former User

            @cvp The code is open-source. But I have to say, I'm naive and the code is not easy to review, even I kept changing again and again. Maybe you can help me review?

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

              @lpl Not easy to help without the code

              ? 2 Replies Last reply Reply Quote 0
              • ?
                A Former User @cvp last edited by

                @cvp https://github.com/yjqiang/yj_ebook_reader

                Run eimg_reader.py or ebook_reader.py, and be careful, there are some 18+ contents.

                1 Reply Last reply Reply Quote 0
                • ?
                  A Former User @cvp last edited by

                  @cvp I can use telegram to chat, if you often uses it too.

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

                    @lpl Sorry but it seems a little bit big to really be able to help.
                    When you scroll your indexes, the script has to update the images in the buttons, thus it takes some time and if you scroll to quickly, has not enough time to refresh the images?
                    Your white parts happen when you scroll quickly?

                    ? 2 Replies Last reply Reply Quote 0
                    • ?
                      A Former User @cvp last edited by

                      @cvp I use several Labels or Buttons as the subviews of ScrollView. When we scroll, if one subview is hidden(can't be seen by users), then we can move the subview from the top side to the other side.

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User @cvp last edited by

                        @cvp And yes, when I scroll quickly, the white part shows. But just for Buttons, not Labels or ImageViews. So I think the performance of Button.title is not good.

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

                          @lpl I don't think the title is the reason.
                          I have import d your code but when I try to run it, I have an error on

                          Import toml
                          

                          Toml Not found

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

                            @lpl try your buttons without image, just to check

                            ? 1 Reply Last reply Reply Quote 0
                            • ?
                              A Former User @cvp last edited by

                              @cvp pip install toml I used toml module in my code. Should write a requirement file.

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

                                @cvp one question: when you have to display a new index, do you need to get data from internet? If yes, that could explain why it is slower

                                ? cvp 2 Replies Last reply Reply Quote 0
                                • ?
                                  A Former User @cvp last edited by

                                  @cvp No, I loaded all and then I display them.

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

                                    @lpl toml loaded, crash

                                    Traceback (most recent call last):
                                      File "/private/var/mobile/Containers/Shared/AppGroup/668A7D98-7216-47ED-917D-AA0B6173167E/Pythonista3/Documents/yj_ebook_reader-master/yj_ebook_reader-master/ebook_reader.py", line 27, in <module>
                                        controller = Controller(EBookLoader, EBookReader)
                                      File "/private/var/mobile/Containers/Shared/AppGroup/668A7D98-7216-47ED-917D-AA0B6173167E/Pythonista3/Documents/yj_ebook_reader-master/yj_ebook_reader-master/controller.py", line 17, in __init__
                                        self.reader_viewer = ReaderViewer(self)
                                      File "/private/var/mobile/Containers/Shared/AppGroup/668A7D98-7216-47ED-917D-AA0B6173167E/Pythonista3/Documents/yj_ebook_reader-master/yj_ebook_reader-master/ereader.py", line 55, in __init__
                                        super().__init__(EBookBodyViewer, controller)
                                      File "/private/var/mobile/Containers/Shared/AppGroup/668A7D98-7216-47ED-917D-AA0B6173167E/Pythonista3/Documents/yj_ebook_reader-master/yj_ebook_reader-master/ereader.py", line 9, in __init__
                                        self.var_index_viewer = IndexViewer(self)
                                      File "/private/var/mobile/Containers/Shared/AppGroup/668A7D98-7216-47ED-917D-AA0B6173167E/Pythonista3/Documents/yj_ebook_reader-master/yj_ebook_reader-master/index_viewer/index_viewer.py", line 12, in __init__
                                        reader_view = ui.load_view('index_viewer/index')
                                      File "/var/containers/Bundle/Application/E4751F4F-64A4-4BE6-AB9D-9C9564715002/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/ui.py", line 412, in load_view
                                        return load_view_str(json_str, bindings, stackframe, verbose=verbose)
                                      File "/var/containers/Bundle/Application/E4751F4F-64A4-4BE6-AB9D-9C9564715002/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/ui.py", line 398, in load_view_str
                                        return _view_from_dict(root_view_dict, g, l, verbose=verbose)
                                      File "/var/containers/Bundle/Application/E4751F4F-64A4-4BE6-AB9D-9C9564715002/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/ui.py", line 379, in _view_from_dict
                                        subview = _view_from_dict(d, f_globals, f_locals, verbose=verbose)
                                      File "/var/containers/Bundle/Application/E4751F4F-64A4-4BE6-AB9D-9C9564715002/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/ui.py", line 321, in _view_from_dict
                                        _bind_action(v, attrs.get('action'), f_globals, f_locals, verbose=verbose)
                                    TypeError: my_bind_action() got an unexpected keyword argument 'verbose'
                                    
                                    ? 1 Reply Last reply Reply Quote 0
                                    • ?
                                      A Former User @cvp last edited by A Former User

                                      @cvp Maybe you changed some parts of the code? I'm sure there is no such serious bug.

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

                                        @lpl no change at all, but I have the new Pythonista beta...

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

                                          @lpl could you tell me where is the code which is executed when you scroll your indexes

                                          ? 1 Reply Last reply Reply Quote 0
                                          • ?
                                            A Former User @cvp last edited by

                                            @cvp I'm using the beta too. And I shared the code to my friends. No such issues before… so strange

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