tcl::c...:facade(3tcl)
π tcl::chan::facade β bestie, it's the Facade channel π
okay so we're in the tcl::c...:facade(3tcl) page, part of the reflected/virtual channel support saga, and honestly? it's giving middle-management but make it iconic. let's go π«Ά
β¨ NAME β¨
tcl::chan::facade β Facade channel. that's it, that's the name, short and slay π
πΈ SYNOPSIS πΈ
package require Tcl 8.5 9
package require TclOO
package require logger
package require tcl::chan::core ?1.1?
package require tcl::chan::facade ?1.1?
::tcl::chan::facade chan
like yes you need all of those, no skipping, the dependency list is the whole vibe check β¨
π¦ DESCRIPTION π¦
so the tcl::chan::facade package hands you a command that builds facades to other channels. and what even is a facade, you ask? it's a channel that owns exactly one subordinate channel and just... delegates every single operation to it. no cap. it's the friend who forwards your texts to the group chat π
the main reason facades exist is for debugging the actions on a channel. and here's the tea: most of the info could be tracked by a virtual channel transformation, BUT β and this is the plot twist β that transformation doesn't have access to the event-related operation, and on top of that, transformations are only available in Tcl 8.6. π
so therefore: this channel works with Tcl 8.5, and it has access to everything going on for a channel. everything. all of it. main character energy fr fr π
the intercepted actions on the channel are logged through the package logger. so it's basically a lil spy that journals about it πΈ
and beyond all that, facades give you these extra channel configuration options:
-selfβ the TclOO object handling the facade. yes, it knows itself, self-care π-fdβ the handle of the subordinate channel, i.e. the wrapped channel. the lil one inside π-usedβ the last time the wrapped channel was read from or written to by the facade, as perclock milliseconds. a value of0means the subordinate channel was not accessed at all, yet. not once. ghosted π-createdβ the time the facade was created, as perclock milliseconds. its birthday π-userβ a free-form value identifying the user of the facade and its wrapped channel. put whatever you want in there bestie, it's free-form β¨
β οΈ of these options, only -user is writable. the rest are read-only, look-don't-touch, admire-from-afar π
π₯ API π₯
::tcl::chan::facade chanβ this command creates the facade channel around the provided channelchan, and returns its handle. that's the whole API, one command, and it ATE π
π BUGS, IDEAS, FEEDBACK π
ngl this document, and the package it describes, will undoubtedly contain bugs and other problems. it's giving "we know, we know". so please report them in the category virtchannel of the Tcllib Trackers at http://core.tcl.tk/tcllib/reportlist. and if you have ideas for enhancements for either the package and/or the documentation, report those too, we wanna hear it π«Ά
when proposing code changes, please provide unified diffs, i.e. the output of diff -u. periodt.
also note β and this part matters β attachments are strongly preferred over inlined patches. you can make an attachment by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar. that's the whole ritual, no shortcuts π§
β KEYWORDS β
concatenation channel, reflected channel, tip 219, virtual channel
π CATEGORY π
Channels
π COPYRIGHT π
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's the page bestie!! this one shipped as tcllib version 1.1, and the manual page itself is titled tcl::c...:facade(3tcl) β so yeah, go forth, wrap a channel, log everything, and remember: only -user is writable πβ¨
π¦ where this page comes from
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms