[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [plt-scheme] Re: webserver and print-struct



DrScheme sets up a special inspector for the read eval print loop.
Whenever a value is printed by the repl, the contents of the structure
are shown. If you were to `display' the value or something like that,
you'd not be able to see the contents of the struct.

I think that you've found the most workable solution, by adding
`make-inspector' to your struct definitions.

Robby

At Sat, 4 May 2002 13:47:44 +0200, Jens_Axel_Søgaard wrote:
> Hello all
> 
> I finally got it to work (printing structures in the web-server that is).
> 
> It was a question of rereading the manually very carefully.
> 
> The manual says:
> 
>     ... , but the vector exposes only as much information about the
> structure as the current inspector can access (see section 4.5).
> 
> Thus the problem was that the inspectors were behaving differently in
> DrScheme and in the web-server.
> (I can't figure out why.)
> 
> All I had to do was to change
>     (define-struct entry (name date contents))
> to
>     (define-struct entry (name date contents) (make-inspector))
> in order to make everything work.
> 
> Thanks for all the suggestions.
> 
> [By the way - I can't get the launcher to work in winXP - but maybe they're
> not supposed to?]
> 
> --
> Jens Axel Søgaard
> 
> 
> 
>