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 But I need to display the full images on the screen which may have different sizes.
-
@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
-
@cvp Sorry. I wrote another word. I understood that, but I'm not a native speaker so sometimes I may wrote the wrong word.
-
@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 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?
-
@lpl Not easy to help without the code
-
@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