- From: Henrik Frystyk Nielsen <frystyk@w3.org>
- Date: Wed, 07 Apr 1999 09:06:40 -0400
- To: www-lib@w3.org
- To: Lucio Torre <lucio@core-sdi.com>
Lucio Torre wrote: > I have been tinkering with the showtext sample and made some changes. in > the text callback i added a htchunk_putb, that writes to the chunk i > created with loadtochunk and stored in the anchor w/setDocument. You can't both write to the HTML parser and use load to chunk at the same time unless you use a Tee stream [1], part of the Stream package [2]. The two streams can't be cascaded as they really are "terminating" streams - one converts the stream into callbacks (the HText interface) and the other converts the stream into a memory object (the HTChunk). What you can do is to create a HTChunk object when you are called when HTML parsing is about to start [3], for example. Then you can write to it as you feel like in any of the other HText callbacks. > Then i registered a termination funcion that deletes things. > > The problem i have is that if i delete the chunk i added after > termination, new data comes in (dont ask me why, an enter ive seen), and > i get segfault. > > The problem is that if i dont delete the chunk memory grows over time. > > I had a similar problem while deleting anchors. so i didnt do it > anymore, and theres no memory growing. so its ok. You shouldn't actually delete anchors unless you really have to - they contain a lot of useful information about the whereabouts of the application. > And about versions. i ahve the latest tarball... i didnt checkout the > latets version from the cvs because it was not up... i tried looking at > the recent changes but the msql server was down so i couldnt find out if > this was fixed. It should be up now. Henrik [1] http://www.w3.org/Library/src/HTTee.html [2] http://www.w3.org/Library/src/WWWStream.html [3] http://www.w3.org/Library/src/HText.html#ss
Received on Wednesday, 7 April 1999 09:06:45 UTC