I wanted to share a tiny (1 KLOC) Unix GUI man page viewer I made that uses Tcl/Tk 9.0.2.
It is available here: https://github.com/mark-summerfield/manpager
I’ve done it using TclOO which I find a lot more "natural" to my programming
style (having programmed in Python for so long).
Manpager makes use of some Tcl/Tk 9-specific features including:
* callback - which I use a lot
* my varname
* lseq
* exec’s -encoding argument (which is why it needs 9.0.2)
* file home
* oo::abstract
The code I’m most pleased with is a minute (6 line) class:
oo::class create Ref {
variable Value
constructor value { set Value $value }
method get {} { return $Value }
method set value { set Value $value }
}
I use this instead of using upvar. It allows me to wrap a value and pass it down the call stack as deep as I like just like a normal value, but at any point the value can be changed by using the set method. For a usage example see app_actions-1.tm’s on_config method and config_form-1.tm’s ConfigForm class.
In my Store version control alternative https://github.com/mark-summerfield/manpager I use even more Tcl/Tk 9 features including oo::singleton to lazily create dialog windows which I
want to keep available (but hidden when not in use) to preserve their state, size, and position.
I’ve found Ashok Nadkarni’s books really helpful. Just wish there was a volume covering Tk!
All in all I am enjoying using Tcl/Tk 9 far more than I’ve ever enjoyed Tcl programming before.
I wanted to share a tiny (1 KLOC) Unix GUI man page viewer I made that uses Tcl/Tk 9.0.2.
It is available here: https://github.com/mark-summerfield/manpager
[snip]
On 8/22/25 2:57 AM, Mark Summerfield wrote:
I wanted to share a tiny (1 KLOC) Unix GUI man page viewer I made that uses >> Tcl/Tk 9.0.2.
It is available here: https://github.com/mark-summerfield/manpager
[snip]
That page provides just enough to whet my interest
I'm a retired Tcl/Tk newbie who hasn't used it for too long.
You describe it as an alternative to gman - with which I'm unfamiliar
and Synaptic doesn't give a "homepage" for it.
Do you have a more complete description of your app?
Is there a good description somewhere of gman that would give me an idea
of what you wanted to accomplish?
TIA
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,064 |
Nodes: | 10 (0 / 10) |
Uptime: | 170:40:53 |
Calls: | 13,692 |
Files: | 186,936 |
D/L today: |
90 files (19,324K bytes) |
Messages: | 2,411,676 |