W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1999

AW: Question about usage of HText-Callbacks - Have a very specific problem ...

From: Michael Maretzke <michael@ibs.debis.de>
Date: Tue, 3 Aug 1999 12:49:32 -0400 (EDT)
To: "Raffaele Sena" <raff@nuvomedia.com>, <www-lib-request@w3.org>
Message-ID: <012501beddd8$e01157e0$6f4aa2c2@develop8.ibs.debis.de>
Hey, Raffaele ;)

I think you know the documentation about 100% better than me ... or better
said not only the documentation.

>     I don't have the right code in front of me right now, but I think you
> can associate
>     a context to the request object ( HTRequest_setContext ) and
> retrieve it
> from the
>     callback.
I read about this function in documentation. Looks good. But I think it's
to late for me to understand this concept in detail.
Therefor I've got another question.

>     Also, if you call HText_registerCDCallback you can set your
> own Text_new
> and Text_delete
>     callback and have the Text_new create the context that will be passed
>    to all the other HText callbacks as a context (HText * text).
Okay, after looking for some minutes into the documentation I generated this
in mind:

In my main()-function I set a context via HTRequest_setcontext(void*). This
context may I retrieve in HText_new (which I may register as a callback for
creation of HText-objects). Okay. No problems until here. Via the context
(I get it via void* HTRequest_context()) I may construct any memory
structures
I want. Okay. But how may I access this structures in a callback e.g.
addText ?
addText receives an HText* text. But I've no access to the HTRequest-object
...

Have I a problem understanding or am I to bad to
read the documentation correctly ?
[ or is it to late ... after 10 hours programming ? ]

RU Michael.
Received on Tuesday, 3 August 1999 22:53:32 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:17 UTC