wxHTTP in console application
Franky Braem
f.braem at skynet.be
Fri Sep 14 12:25:56 PDT 2007
franky.braem at gmail.com wrote:
> On 14 sep, 02:41, va... at wxwidgets.org (Vadim Zeitlin) wrote:
>> On Thu, 13 Sep 2007 02:32:27 -0700 franky.br... at gmail.com wrote:
>>
>>> I have ported wxHTTP to wxJavaScript and found that when no frames/
>>> dialogs are created the wxHTTP hangs when it gets the inputstream
>> This is not related to having frames/dialogs AFAIU but to running (or not)
>> the event loop.
>>
>
> The script is run in the OnRun and after execution it checks whether a
> topwindow is created and calls MainLoop. The mainloop can't be entered
> when there is no window, because it blocks the console program.
>
> Is it a solution to create a user defined event wxScriptEvent? Then
> OnRun will call AddPendingEvent and enter the mainloop. When the event
> is processed it will execute the script and check if a topwindow is
> created. When there is no topwindow, the mainloop will be exited.
>
> Franky.
>
I've tried this out and it seems to work ...
Franky.
More information about the wx-users
mailing list