home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
help.tcl
< prev
next >
Wrap
Text File
|
1996-09-12
|
2KB
|
81 lines
#---------------------------------------------------------------------------
#
# (c) Westmount Technology 1995
#
# File: @(#)help.tcl /main/titanic/1
# Author: Fred Mol
# Description: main help.tcl
#---------------------------------------------------------------------------
# SccsId = @(#)help.tcl /main/titanic/1 12 Sep 1996Copyright 1995 Westmount Technology
OtkRegister::extGui
source [m4_path_name tcl libocl.tcl]
proc read_require_file {file} {
if [catch {set name [m4_path_name tcl $file]}] {
set name $file
}
source $name
}
require procs.tcl
require messagehdl.tcl
require helptool.tcl
proc usage {} {
error "Usage: otk help.tcl -- \[-c caller\] helpRoot firstPageURL"
}
set argc 0
set status INITIAL
set caller ""
foreach arg $argv {
case $arg in {
{-c} {
if {$status != "INITIAL"} {
usage
}
set status CALLER
}
{default} {
case $status in {
{CALLER} {
set caller $arg
set status INITIAL
}
{INITIAL} {
set root $arg
set status URL
}
{URL} {
set firstPageURL $arg
if {[string range $firstPageURL 0 0] != "/" &&
[string range $firstPageURL 0 8] != "helptool:"} {
set firstPageURL $root/$firstPageURL
}
set status END
}
{default} {
usage
}
}
}
}
incr argc 1
}
if {$status != "END"} {
usage
}
HelpTool new .main
.main config \
-root $root \
-firstPageURL $firstPageURL \
-tocFile $root/TOC \
-indexFile $root/INDEX \
-caller $caller
.main popUp
.main ready
set initDone 1