Re: Avoid blocking the UI



On Sun, 2006-08-06 at 01:02 -0500, Diego Escalante wrote:

> This email is short because my problem is small but nasty: how do I
> make *anything* in an async way so the gtk+ callbacks aren't waiting
> for me to end my *anything*.

The correct way to do this (pretty much necessary anyway, because of
cookies, SSL, etc) is to use a Mozilla component. Mozilla's networking
stuff is async already. Unfortunately, until PyXPCOM is compiled into
Epiphany (don't hold your breath), that means writing some C++ code.

This is a painful task. error-viewer's link checker is a good example of
how to do this sort of thing, but I don't know which Mozilla component
to use or how to invoke it.

Then again, I wonder: what do you gain by doing a HEAD request to the
server? The entire page has already been downloaded, right? I think the
proper order of events is to call your extension's code from within an
XPCOM listener attached to [object X which is some sort of HTTP
channel]. (If my memory serves me correctly, this is done in the link
checker as well.)

In other words: the Firefox extension's way of doing it is an ugly hack,
and limitations of Epiphany's extension system prevent that hack from
working. There's probably a much nicer way to do it, but it takes C++
(for now), or PyXPCOM (which isn't distributed yet).

Don't let that dismay you. C++ is not impossible!

Good luck,

Adam
-- 
Adam Hooper <adamh densi com>

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]