[wx-dev] horror with wxUrl::GetInputStream
Christian Buhtz
exsudat at gmx.de
Fri Jul 11 11:40:42 PDT 2008
Code like this doesn't work...
wxSocketBase::Initialize();
wxURL url(ANY_URL);
wxInputStream * stream = url.GetInputStream();
...because the call of wxUrl::GetInputStream() "freez" the application.
The forum is full of post about that.
There are some solutions and workarounds.
1. Downloading a file with wxUrl should be done in a extra thread.
2. Use a third-party lib (e.g. wxDownloadFile)
I don't want to blow up my code for such a simple task with foreign
code. By the way is wxDownloadFile very ugly and unprofessional code.
Is it realy so hard to download a file with wxUrl?
How can I do this?
btw: My application is not event driven. There is no window!
More information about the wx-dev
mailing list