Pad++ Programmer's Guide

RUNNING PAD++


To run a sample Pad++ application, simply type "paddraw" (assuming Pad++ has been properly installed.) This runs a demo application, PadDraw. PadDraw shows off many of Pad++'s abilities. It is written entirely in Tcl, and looking at its code is a good way to learn how to create Pad++ applications. There is currently no documention for PadDraw.

Running PadDraw in this fashion does not give access to the Tcl interpreter. This is because the "paddraw" program is actually a shell script that runs the Pad++ executable (which is named "padwish"), and then loads the Tcl files to run PadDraw. To access the Tcl interpreter, you must set a few environment variables, and then run padwish. This can be done automatically by running the "pad" script.

The environment variables to set are TCL_LIBRARY and TK_LIBRARY (which point to the Tcl/Tk run-time libraries), and PADHOME (which points to the Pad++ run-time library and the PadDraw application). Looking at the "pad" script will show you what to set these environment variables to.

Once you've run padwish, the Pad++ windowing shell, you can start writing your own applications, or you can run PadDraw by typing in the interpreter:

source $env(PADHOME)/draw/pad.tcl


Pad++ Programmer's Guide - 20 JUN 1997

Copyright Computer Science Department, The University of New Mexico

Web Accessibility