[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: webserver and print-struct
Check help-desk for print-convert. You might get it to do what you need
with the right hooks installed (current-print-convert-hook [hook]).
It may be easier to use map to produce an s-expression and then
reparse it as long as you don't have many struct types.
Paul
At Wed, 1 May 2002 21:02:47 +0200, Jens_Axel_Søgaard wrote:
> Hi all
>
> I have problems with the following function.
> I am writing a litle guest book using the PLT web-server.
> The entries in the book is internally represented by a list of
> structures. I want to save the structures and retrieve them later,
> therefore I use (print-struct #t) so that the structures are printed as
> vectors. When I read them I convert them. My problem is
> that the web-server apparently does not respect the parameter,
> i.e. does not print vectors but prints #<struct..> stuff in stead.
>
> (define (save-book)
> (let ([port (open-output-file filename 'replace)])
> (print-struct #t)
> (print book port)
> (close-output-port port)))
>
> Ideas?
>
> --
> Jens Axel Søgaard
>
>
>
>
>