Send mailto: krehbiel.tom at gmail dot com
I am a software developer that was originally educated as an electrical engineer. I have held a varity of jobs other than software developer including semiconductor circuit designer, semiconductor device engineer, developer & manager of CIM systems manager and parametric testing manager. Before the UNIX revolution in the '80s I developed software on IBM mainframes, DEC mini's and Zerox time share systems. At that time I mostly programmed in Fortran but in the late '80s I switch to C as UNIX systems became more prevalent. Graphical user interfaces have always been a special interest of mine. This started when I wrote a menuing systems for a VT100 terminal and has progressed from using Dialog on Apollo systems, then to Xt,Motif, and to UIMX, and finally to Tcl/Tk.
The following are notes on Tclkit/Starkit/Starpack and related subjects. I am gathering notes here and if a note survives and grows it will eventually be moved to its own page.
Using the local mode Wiki::init command
To use a Wikit as a help system for an application you need to do a Wiki::init command. The command has the following syntax
Wiki::init <db-path> [<R/W-flag>] [<tk-path>] [<page>]
Where:
<db-path> - path to .tkd database <R/W-flag> - 1=readonly; 0=readwrite; default is readonly <tk-path> - path to top leve tk window; default is "" <page> - title of page to be displayed; default is ""
How to indent an image on a Wikit page
To indent an image on a Wikit page, preceed the image reference with some number of double qouted blanks.
Example: '' ''[http://myImage.gif]
How to access a Wikit page using its id number
If you need to view a wikit page and you only know its id number, then you can enter the page id surrounded by angle brackets (e.g. '[45]') into the search field. The search engine will report something like:
Searched for "45" (in page titles):
But the "45" in the above message is a link so you can just click on it to go to the page with an id number of 45.
How to check versions of tclkit
The way to check versions of tclkit is:
puts $vfs::tclkit_version
Fetching up-to-date copy of Tclers' Wiki
Using the Img extention
package require Img proc capture { win } {return [image create photo -format window -data $win]} set top .t toplevel $top frame $top.f pack $top.f -fill both -expand 1 label $top.f.hello -text "Hello World" pack $top.f.hello -s top -e 0 -f none -padx 10 -pady 10 update set image_1 [capture $top] set image_2 [image create photo -format window] ${image_2} copy ${image_1} -from 50 0 100 40 -to 0 0 60 40 set c [canvas .c -background black -height 100 -width 100 ] pack $c set l [label .c.l -background white -image ${image_2} ] pack $l $c create window 50 50 -window $l update
GUI Debugging
GUI code can be difficult to debug because procedures are executed through callbacks. I use the Pstack package to help me trace down problems in my GUI code.
Character Class definitions
If you need to know what characters are in one of the classes defined by the "string is <class>" command then take a look at the string class page.
Tcom examples for Microsoft Excel
Examples of how to use the Tcom package to access Microsoft Excel documents can be found at Tcom examples for Microsoft Excel.
SOAP - hello world
The SOAP - hello world example (courtesy of John Seal) is a good starting point for learning how to use tcl SOAP.
StarTool
StarTool is a software reengineering tool that was developed by the UCSD Computer Science Department and is based on Star Diagrams.
After watching a Space Shuttle launch I decide I had to have a count down clock. The Starting from the An analog clock in Tk code I wrote Analog Count Down Clock which includes spinboxs to set the time and buttons to start, pause, continue and reset.
I received the following advice from Pat Thoyts on TkChat concerning how to load tile into version 8.5 for use with code written for version 8.4.
I have the following in tkchat.tcl for back compat: # tile to ttk compatability interp alias {} ::ttk::style {} ::style interp alias {} ::ttk::setTheme {} ::tile::setTheme interp alias {} ::ttk::themes {} ::tile::availableThemes interp alias {} ::ttk::LoadImages {} ::tile::LoadImages