Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 23 |
Nodes: | 6 (0 / 6) |
Uptime: | 46:41:26 |
Calls: | 583 |
Files: | 1,138 |
Messages: | 111,067 |
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
IrCOve 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
* execrCOs -encoding argument (which is why it needs 9.0.2)
* file home
* oo::abstract
The code IrCOm 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.tmrCOs on_config method and config_form-1.tmrCOs 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.
IrCOve found Ashok NadkarnirCOs books really helpful. Just wish there was a volume covering Tk!
All in all I am enjoying using Tcl/Tk 9 far more than IrCOve 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
On Fri, 22 Aug 2025 06:15:16 -0500, Richard Owlett wrote:
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
In Debian 12 (bookworm)'s synaptic there's a gman package.
But no mention of a home page.
There's a screenshot of it here (scroll down about 40%): https://askubuntu.com/questions/253705/graphical-user-interface-to-view-man-page
and a manual page here: https://manpages.ubuntu.com/manpages/xenial/man1/gman.1x.html
It appears to be 26 years old and is maybe no longer maintained.
The main reason I created my own is that gman always shows the man pages
in an external viewer; I wanted them shown in the GUI app & also to
have clickable man page links, e.g., if you click, say, man(1) that
man page will appear.
I don't have a more complete description of Manpager.
If you install and run it (basically download a zip or clone it
and put it anywhere -- providing you have a wish 9.0.2 in your
path called wish9 & Tcllib & Tklib) it should be easy to use.
The only help is in the tooltips.