tcl::chan::facade(n)
π tcl::chan::facade β the manual, but make it make sense π
okay bestie, sit down, hydrate, because we're talking about tcl::chan::facade β the facade channel from the Reflected/virtual channel support crew in tcllib. yes it's giving niche. yes it's iconic. let's go π¦
β¨ NAME β¨
tcl::chan::facade β Facade channel. that's the whole name, she's simple, she's elegant π
π 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, look at her. five requires and a command. main character energy fr fr β¨
πΈ DESCRIPTION πΈ
okay so the tcl::chan::facade package hands you a command that makes facades for other channels. and what is a facade, you ask? it's a channel that owns exactly one subordinate channel and just... delegates everything to it. every operation. all of them. it's the middle manager of channels, except genuinely useful π
the big brain use case here is debugging what's happening on a channel. because like β sure, a virtual channel transformation could track most of the info, but it does not have access to the event-related operation. also they're only available in Tcl 8.6, so. rough.
so this channel exists: it works on Tcl 8.5, and it has access to everything going on for a channel. everything. the whole vibe check. π
the intercepted actions on the channel get logged through the logger package. so yes, it's a little snitch, but a helpful one π«Ά
and beyond all that, facades give you these extra channel configuration options:
-selfβ the TclOO object handling the facade. that's her. that's the girl.-fdβ the handle of the subordinate, i.e. the wrapped channel. the one underneath. the intern.-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 even once. untouched. pristine. π)-createdβ the time the facade was created, as perclock milliseconds. her birthday π-userβ a free-form value identifying the user of the facade and its wrapped channel. write whatever you want in here, it's your little name tag.
β οΈ heads up bestie: out of all of those, only -user is writable. the rest are read-only. do not try it. she will not budge. π
β API β
::tcl::chan::facade chanβ this command creates the facade channel around the channel you pass in aschan, and returns its handle. that's it. that's the whole API. short and slay. β¨
π BUGS, IDEAS, FEEDBACK π
ngl, this document and the package it describes will undoubtedly contain bugs and other problems. like, obviously. it's software. π
please report such things in the category virtchannel of the Tcllib Trackers: 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 want them!! π«Ά
when you're proposing code changes, please provide unified diffs, i.e the output of diff -u. fr fr, that's the format.
also note: attachments are strongly preferred over inlined patches. to attach something, go to the Edit form of the ticket immediately after its creation, and then use the left-most button in the secondary navigation bar. iykyk π
π₯ 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 whole page bestie, no notes. this one came from tcllib, version 1.1, and she's filed under tcl::chan::facade(n) β go forth and wrap some channels, you absolute legend πβ¨π¦
π¦ where this page comes from
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- 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