W3C home > Mailing lists > Public > www-lib@w3.org > October to December 1999

Re: libwww with glib/gtk+

From: <jose.kahan@w3.org>
Date: Fri, 22 Oct 1999 11:55:56 +0200 (MET DST)
Message-Id: <199910220955.LAA02035@tuvalu.inrialpes.fr>
To: james@daa.com.au (James Henstridge)
Cc: www-lib@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:35 GMT