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.
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.
#3 (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.
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