tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David N. Welton)
Subject Re: putx {= bug
Date Fri, 28 Dec 2001 13:10:44 GMT
Ronnie Brunner <> writes:

> > The above is also wrong, and would cause errors - it would have to be:

> > web::put [web::response] [subst %s]

> > (this was the error that I filed the bug about)

> This should not be an error:

>      web::put [web::response] [subst %s]

> should be exactly the same as

>      web::put [subst %s]

Yes, but when the web::put has been expanded inside of {=, therein
lies the problem:

web::putx \#foo {= $bar}

gets transformed into (more or less)

web::put $bar

so maybe my solution isn't right either, but basically, it needs to
keep track of where it's supposed to be outputting things.  The
problem is when it isn't using the default channel, but instead
explicitly sending to a particular channel.

> if no channel is given to web::put, web::put will always send to the
> current channel (which is [web::response]). This is the whole idea
> of web::put: redirect the channel and run the same code to create a
> file or send output to the web!

Which works just fine, just as long as one is careful.

David N. Welton
Free Software:
   Apache Tcl:

View raw message