Re: Problem registering link callback

> I've created a simple client application using
HTProfile_newPreemptiveClient for the profile.
>
> I've created a link callback function and registered it with
'HText_registerLinkCallback'.
>
> The problem is that my callback function doesn't get called at all.  I'm
using HTLoadToChunk to
> retrieve a web page.  Is there something else I need to do to parse this
chunk?  I assumed it
> occured when downloading the page.
>
    I may be wrong, but I think the various HTLoadTo* methods don't go
through the
    SGML/HTML parser. If you need one callback function to be called I guess
you'll
    have to do a regulat HTLoad (HTLoadAbsolute or such) and implement all
the callbacks
    you need. So, if you also need to dump the content on a file or chunk,
you'll have to
    have your callback do so.

    It could be, but I'm really just guessing, that you can create two
streams, one
    to send data to the chunk and the other to parse the data. But the flow
of data
    into these will be somehow unrelated (I mean, you will not know where
you are
    in the chunk when the Link callback is executed).

    Another way of retrieving the full document content and get the callback
executed
    is to use the cache. There should be a way, after the document has been
loaded and
    parsed, to retrieve the cached copy.

Hope this help,

    Raffaele

Received on Wednesday, 1 September 1999 14:02:59 UTC