- HOW TO - Splice lines of source code
- HOW TO - Remove C style comments
- HOW TO - Call C# from tcl code
- tcltest - How to get test name inside test command
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 commandTo 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 pageTo 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 numberIf 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):
- No matches found
How to check versions of tclkitThe way to check versions of tclkit is:
puts $vfs::tclkit_version
Fetching up-to-date copy of Tclers' Wiki
- JCW reports that you can always fetch up-to-date copy of the Tclers' Wiki at http://mini.net/cgi-bin/wikit.gz
- AMG: This is now a 404. What is the current link?
- AK: rsync://wiki.tcl.tk/wiki/wikit.tkd
- SRIV: rsync rsync://wiki.tcl.tk/wiki/wikit.sqlite .
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 DebuggingGUI 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.
Microsoft .chm Help Format
Character Class definitionsIf 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 ExcelExamples of how to use the Tcom package to access Microsoft Excel documents can be found at Tcom examples for Microsoft Excel.
SOAP - hello worldThe SOAP - hello world example (courtesy of John Seal) is a good starting point for learning how to use tcl SOAP.
StarToolStarTool is a software reengineering tool that was developed by the UCSD Computer Science Department and is based on Star Diagrams.
Analog Count Down ClockAfter 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.
TileI 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
- Pronounceable Password Generator
- menubar - A command that creates menubar objects
- Multi-Core Processor Test using Threads and Critcl
- Profiling a TclOO class
- Random Dot Stereogram
- Porting To Windows
- Write PNG File (without using Tk)
- Zip A Directory