2019-08-09 12:15:02

I wrote a simple notepad for blind users, which will be accessible on all platforms. I have a problem, when I'm reading a pdf document, or long txt document, the fieldtext, which the text will appear is freezing. How can i do it without fieldtext freezing? I wanted append the text to the end of fieldtext, because when I'm loading a first chapter of the story, then appending next chapters, the fieldtext is frozen again.

Thumbs up

2019-08-09 13:17:34

First of all, thats too less information. What are you using to display the text field? Might the freeze be related to the GUI framework? Which library are you using to load PDFs/how do you load texts? Might the freeze result out of your program taking very long to actually extract and render the text?
We'll deffinitely need more information to work with.
Best Regards.

Thumbs up

2019-08-09 13:28:45 (edited by pauliyobo 2019-08-09 13:29:08)

you could load the text in an external thread, this shouldn't make your application freeze.
However, before doing this I'd check if your library has functions which allow the library to not block when a button is pressed and is action occurs.

if you wish,  you could give a look at my github profile.
If you want to get in touch with me you can follow me on Twitter
have a nice day.

2019-08-09 14:01:30

I'm using wx python to show the text, pdfminer.six to load pdf's and the text will load with wx Load function. I used the thread to load files, but it does nothing. Python3

Thumbs up