[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [plt-scheme] Re: webserver and print-struct
At Sat, 4 May 2002 16:15:34 +0200, Jens_Axel_Søgaard wrote:
> Robert Bruce Findler wrote:
> > 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.
>
> The printing of the contents of a structure should be accomplished by
> (print-struct #t). But this of course only works if the inspector is able
> to see into the structure.
Exactly.
> My code was like this:
>
> (define-struct indlæg (forfatter dato indhold) (make-inspector))
> (unit/sig () (import servlet^)
> ...)
>
> Perhaps I should try this in stead:
>
> (unit/sig () (import servlet^)
> (define-struct indlæg (forfatter dato indhold))
> ...)
I'm not sure if the web server creates an inspector, but I'd guess that
it doesn't.
> I guess my trouble originates in the fact, that I am a little unsure
> where and when the inspectors are born. And which inspectors
> the printing routines are using.
As far as I know, the only place that an inspector is created is by the
DrScheme REPL (mz's and mred's, for example, do not).
Robby