WxWidgets: Non-blocking FTP Copy

I want to copy a file to an FTP server using wxFTP, but I would like to do it without blocking the UI, and much better by showing a progress bar. Can I do this without additional thread?

I am using wxLua, but I can adapt a solution written in any language as long as it uses the wxWidgets binding.

0


source to share


2 answers


Try using wx.lib.delayedresult . It's available in wxPython, but it's probably also in your wxWidgets library. It creates a separate worker thread and is called with a consumer function that is called when the worker thread finishes its work. A very useful thing.



See the wxPython docs for details .

+1


source


What's wrong with creating your own theme for this?



You can check the thread periodically canRead()

(via a timer or in an event loop) and only read when it returns true, but it will probably be much more difficult than just starting a separate thread.

0


source







All Articles