Re: libwww with glib/gtk+

Hello James,

In our previous episode, James Henstridge said:
> 
> A while back I posted about using libwww with gtk+.  I have the HTEvent
> and HTTimer interfaces implemented correctly now, and was looking at
> implementing some of the alert dialogs.

This is great. I had taken your previous implementation and interfaced it
in our Amaya/gtk version. It worked quite well (except for the lack of
timers).

> Since I am implementing them in gtk, the event loop runs while the dialog
> is on screen waiting for the user's input.  This also means that libwww
> events and timers can be processed while the dialog is on screen (ie.
> event and timer handlers will be called before the alert callback
> function has returned). When this happens however, I get a segfault in
> libwww.
> 
> Should I expect libwww to handle this condition, or do I have to write 
> some code to suspend the HTEvents and HTTimers while the dialog is on
> screen?

Let's say that libwww handles the network events and related timers your
application may have set up. But it's the gtk (or is it gdk?) event loop 
that connects events with the registred callbacks.

I don't think you should suspend your timers, as it'd mean something like
"don't receive anything, not even timeouts, until the user pushes the
done button".

I don't know which kind of event you're dealing in the dialogue message,
but it may be there that you should suspend or kill the request, then
launch it again.

I hope this helps you.

Thanks for your report!

-Jose

Received on Friday, 22 October 1999 05:56:12 UTC