tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@dedasys.com (David N. Welton)
Subject Re: putx {= bug
Date Fri, 28 Dec 2001 13:10:44 GMT
Ronnie Brunner <ronnie@netcetera.ch> 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
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Mime
View raw message