home *** CD-ROM | disk | FTP | other *** search
- # tcllib sample program.
- #
- # By Dennis R. LaBelle - January 27, 2002
- #
- # This program demonstrates a method of wrapping tcllib with freeWrap 5.1 and later.
- #
-
- catch {console show}
-
- # Set a variable specifying the original top level directory of package at the time of wrapping.
- # Remember, file paths are now case sensitive under both Unix and Windows.
- set topdir /tkprogs/freeWrap/sample/tcllib/tcllib1.0
-
- # Add a few directories to auto_path so TCL can find our wrapped tcllib packages.
- global auto_path
- foreach path {{} base64 cmdline counter csv fileutil ftp ftpd html htmlparse javascript log math md5 mime ncgi nntp pop3 profiler report sha1 struct textutil uri} {
- lappend auto_path [file join $topdir $path]
- }
-
- # run the demo - use one of the tcllib commands
- package require textutil
- set dtemp { ab c }
- set result "Trimming \{$dtemp\} produces \{[::textutil::trim $dtemp]\}"
- label .label1 -textvariable result -background slategray4 -foreground white -relief ridge -font {Helv 12}
- pack .label1 -pady 4
- button .btn1 -text Quit -command exit
- pack .btn1
-