Home : Tcl/Tk

Will's Tcl/Tk Page

simple, easy, efficient

What's New"

I'm working on a tile-based dungeon-crawling sort of game; see the Ramble Home Page.

Some new resources: Snit and Notebook. See below.

The site gets a minor facelift.

Posted trycatch 2.0, which extends the package considerably.

Added a new Tcl package, trycatch 1.0.

Update to the Guide to Creating Object Commands. I fixed a few minor style errors, and added a section on improving the quality of the error trace.

Minor update to the Guide to Success with Namespaces and Packages.

Tcl/Tk Resources

Will's Guide to Success with Namespaces and Packages
The standard Tcl distribution has sufficient documentation about how the namespace and package commands work, but little information about how to use namespaces and packages cleanly and effectively. As I didn't see any such collection of information available on the 'net, I decided to write my own. It's proved to be extremely popular over the years.

Will's Guide to Creating Object Commands
Object interfaces are all the rage these days, yet creating object commands is tricky in the new world of namespaces. This guide shows how to create a simple object in pure Tcl in a manner that's namespace robust. Another popular item.

Snit's Not Incr Tcl
Will's own object and Tk megawidget framework. It's a few steps beyond the Guide to Creating Object Commands.

Notebook: The personal notebook application.
Finally, a place to put all those notes and journal entries you've been accumulating--where you'll never lose.

Ramble: tile-based dungeon-crawl
An old-fashioned hack-and-slash sort of adventure game...or that's the intent, anyway...with extensive notes on the design and implementation.

trycatch 2.0 -- Tcl exception handling

The Tcl "error" and "catch" commands support reasonably robust exception handling in Tcl...but writing complicated constructions using "catch" is annoying. The trycatch package implements a new control structure, "try...catch", that provides a level of sweetener on top of "catch".

Version 2.0 adds two new forms, "try {...}" and "try {...} finally {...}", and two commands, "throw" and "onerr", to improve handling of Tcl error codes.

Download trycatch 2.0:

Expand Home Page
Expand is a macro expansion tool written using Tcl as the macro language. Expand is the primary tool I use for maintaining this website; my HTML source contains macros which expand into the HTML boilerplate and other text needed to give my site its look and feel. The navigation bar at the top of this page, for example, was generated by this macro: [mainNavbar]

Tcl Developer Exchange
The Tcl community is in a state of change at the moment, but this is still probably the best place to go look for information about Tcl.

Tcl Style Guide
This style guide was written by and for the use of the Tcl project at Sun Microsystems. It has since become the de facto standard Tcl/Tk style guide.

If you have questions, comments, or suggestions about this page, feel free to contact me at will@wjduquette.com.

Home : Tcl/Tk
Copyright © 2005, by William H. Duquette. All rights reserved.
Search this site:

• The View from the Foothills
• Namespaces
• Objects
• Expand
• Notebook
• Snit
• E-Mail
• Links
• FAQs About Us

Amazon Honor System Click Here to Pay Learn More

Sites we like:

James Lileks
Banana Oil
2 Blowhards
God of the Machine
Goliard Dream
Reflections in d minor
Blithering Idiot