contents
| 6.6 - Adding help to a Starkit You can use the WiKit package to add read-only documentation to a Starkit. WiKit is a Tcl implementation of a Wiki - a collaborative authoring tool. When used as a help system the documentation file is contained within the Starkits VFS and compressed along with other scripts and data. To add WiKit to a Starkit, download the Wikit Starkit and use it to create the documentation file. By convention, documents are stored in a doc directory under the Starkit VFS: $ mkdir mykit.vfs/doc Note that Wikit contains its own help, and so is a good example of a Starkit help system. Next, unwrap Wikit and copy the autoscroll, gbutton and wikit packages from the lib directory to your Starkit lib directory. When required, your application can display the documentation using the following commands: package require Wikit A common approach is to have your Starkit display the help documentation when it is started with no arguments. If you do this, the Starkit should be able to output console and graphical help, thus: if {[llength $argv] == 0} { You can even add a help Wiki to a package Starkit (such as Kitten). The starkit::startup package returns an indication of how the Starkit was launched:
Use this in the main.tcl to detect if the package Starkit was launched by a user (or a program), or sourced by another Starkit: package require starkit | see also | ||||