Poet2.2 Manual Prototype Object Extension for Tcl

Installation

Poet is installed by extracting the Poet archive and running install.tcl from the Poet directory.  Run the installer with the wish that you plan to use for development, the files will be installed in the lib/ and doc/ directories corresponding to that wish. (You may need to have adminstrator/superuser privledges to do the installation.) Poet is distributed with Tier 0 compiled for Windows, Linux, and Mac OS X, other users will have to compile it first (binaries are provided for both Tcl 8.4 and 8.5, and they can reside in the installation directory simultaneously). Note: the compilation currently fails on Mac OS X with Tcl 8.4.

If you're going to use BWidget with Tktable, you'll need to patch your BWidget installation by adding the file table.tcl from Poet's instmisc/ directory. This allows BWidget's drag-and-drop support to work with Tktable. Note that Poetics needs this patch!  If you get the error "Invalid command name Table::create", you need to install the patch. The Poet installer has an option to apply the patch to your copy of BWidget (it can also uninstall the patch).

Poet is loaded by issuing the command

package require Poet

from within tclsh or wish.   To select which tiers to load, set the environment variable POET_TIER to 1, 2 (the default) or 3.  For example, to load all three tiers:

set ::env(POET_TIER) 3
package require Poet

If you're in wish and would like to see a demo of the Poet widgets, load the Poet package then send a "demo" message to the ProtoWidget object with:

ProtoWidget demo


Poet is also distributed as a pre-assembled starkit called Poet.kit.  This kit contains Poet2.2, BWidget1.8 (patched as described in the Poet installation instructions), Tktable2.9, Tkhtml3.0, and tkcon, and supports Windows, Linux, and Mac OS X.   If run as in
   
tclkit Poet.kit

or, if you have a wish that supports kits (such as ActiveState's):
   
wish Poet.kit

it will enable Poetics and run the ProtoWidget demo (on Windows, with tclkit or ActiveState Tcl installed, you can just double-click on Poet.kit).   If you provide the name of an empty file or directory as argument, as in

tclkit Poet.kit pool.poet

Poet will use it for persistent storage.  The Poet demo doesn't use any persistent objects, but you can open up a console and create some, and then see that they're still there next time you run Poet with the same .poet file.

The demo also provides an installer that can install or uninstall Poet from the starkit.  Open the kit with the version of Tcl corresponding to the lib and doc directories where you want Poet installed.  If you don't have a wish that supports starkits, you can still install from the starkit by using tclkit to open it and specifying the installation directories by hand.

The kit can also be loaded into a running wish (both tclkit and ActiveState's wish support this) with

source Poet.kit

In this case only Poet is loaded and only up to tier 2 (unless you set POET_TIER as above), but the other packages in the kit are available and will be loaded if used.