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?
-
@cvp https://github.com/yjqiang/yj_ebook_reader
Run eimg_reader.py or ebook_reader.py, and be careful, there are some 18+ contents.
-
@cvp I can use telegram to chat, if you often uses it too.
-
@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? -
@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.
-
@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. -
@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 onImport toml
Toml Not found
-
@lpl try your buttons without image, just to check
-
@cvp
pip install toml
I used toml module in my code. Should write a requirement file. -
@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 No, I loaded all and then I display them.
-
@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'
-
@cvp Maybe you changed some parts of the code? I'm sure there is no such serious bug.
-
@lpl no change at all, but I have the new Pythonista beta...
-
@lpl could you tell me where is the code which is executed when you scroll your indexes
-
@cvp I'm using the beta too. And I shared the code to my friends. No such issues before… so strange
-
-
@lpl sure your req_data does not access internet?
Is it possible to replace your buttons by labels, title->text, only for scrolling, not for clicking, just to see if speed better?
-
@cvp Did you notice "bg"? This means backgroud, and it just send requests. And I use load_data to load the result into view.
-
@lpl ok, sorry
Do you think it is possible to replace buttons by labels if you don't tap them? -
@cvp I compared before, and no white parts with Label.