Version 1 of Wikit Command Line for Windows95

Updated 2001-10-04 13:20:26

Wikit command line options that involve displaying information to standard output (i.e. wikit.tkd -scripts/dump.tcl:text to view the dump.tcl file) do not work on Windows95 because tclkit is a Tk application and standard output gets lost for Tk applications.

One workaround for this is to create a wrapper tcl script that renames the puts command to write to a file instead of to standard output. If the following tcl script were stored in the file console-wikit.tcl, then the command tclkit console-wikit.tcl -scripts/dump.tcl:text followed by the command type stdout.txt, would display the dump.tcl file.

 rename puts puts-orig
 set mystdout [open stdout.txt w+]
 proc puts {args} {
     global mystdout
     eval [concat puts-orig $mystdout $args]
     }
 source wikit.tkd
 close $mystdout

Another workaround is to use console.tkd available at http://www.equi4.com/tclkit/ . From within the resulting TkCon console, set the argc and argv variables appropriately and then type source wikit.tkd. The standard output will be properly displayed in the console. Entering the following commands at the console prompt will display the file dump.tcl:

 set argc 1
 set argv {-scripts/dump.tcl:text}
 source wikit.tkd

Category Wikit