Re: Thoughts about FilterChm
- From: "D Bera" <dbera web gmail com>
- To: "Miguel Cabrera" <mfcabrera gmail com>
- Cc: dashboard-hackers gnome org
- Subject: Re: Thoughts about FilterChm
- Date: Wed, 26 Apr 2006 21:13:29 -0400
> Well I've ready started the work. I decided to modify the filter to
> inherit bahaviour from html filter, and I overrided the DoOpen
> method, but I'm getting some extrage NullPointerException from
> HtmlAgilityPack on methods that previouisly worked flawesly when the
> chm filter was working, i reading that code in order to trace the bug.
> Did someone chaged/updated the code from HtmlAgilityPack?
>
>
> I found this lines when reading the code:
>
>
> // SLIM: _text = reader.ReadToEnd();
>
> _text = new StreamAsArray (sr);
>
> That makes me think that maybe someone chaged/update the code,
> further breaking my code :P
Yeah. Html filter only used StreamReader, so the code in
HtmlAgilityPack got changed to be optimised for that. All the lines
beginning with //SLIM: were replaced by the lines following them.
Somehow Chmfile is refusing to recognize libchm on my machine, so I
couldnt test your filter. But I just checked in a fix in CVS. The fix
basically brings back some old behaviour thus maintains compatibility.
I should have noticed this while patching HtmlDocument :(. Sorry.
In the old behaviour, there was a textreader.ReadToEnd() => for large
files, this would result a huuuuuuge string. I optimised HtmlDocument
to go around that but that will only work if you ask HtmlDocument to
Load a StreamReader. If you pass a TextReader to Load(), it will now
do the old behaviour of ReadToEnd(). So your old code should be
working now.
- dBera
PS: I will be gone from Friday for quite a few weeks. And I would have
limited access to email. Apologies in advance for any such bug that I
might have introduced in HtmlDocument causing you trouble.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]