diff options
author | welch <welch> | 1998-06-27 18:16:23 (GMT) |
---|---|---|
committer | welch <welch> | 1998-06-27 18:16:23 (GMT) |
commit | a058a46a309a143a549befed911bec8212d12b16 (patch) | |
tree | 0c05ef46f90b71468c16eeebf9960000a2b2d4a0 /generic/tkInitScript.h | |
parent | adcb060b5ab8d310f5aff8a1119d3b97baf86641 (diff) | |
download | tk-a058a46a309a143a549befed911bec8212d12b16.zip tk-a058a46a309a143a549befed911bec8212d12b16.tar.gz tk-a058a46a309a143a549befed911bec8212d12b16.tar.bz2 |
Merged changes between child workspace "/home/welch/ws/tk8.0.3" and
parent workspace "/ws/tk8.0".
Diffstat (limited to 'generic/tkInitScript.h')
-rw-r--r-- | generic/tkInitScript.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/tkInitScript.h b/generic/tkInitScript.h index f46503a..c7ac6fe 100644 --- a/generic/tkInitScript.h +++ b/generic/tkInitScript.h @@ -22,10 +22,15 @@ * initialization. * When called from a safe interpreter, it does not use file exists. * we don't use pwd either because of safe interpreters. + * + * We leave the door open to the application by using an existing + * tkInit proc which if it exists is responsible for finding and sourcing + * tk.tcl themselves. With that, an application that wish to ignore + * the env(TK_LIBRARY) or have special initialization need can do it. */ -static char initScript[] = -"proc tkInit {} {\n\ +static char initScript[] = "if {[info proc tkInit]==\"\"} {\n\ + proc tkInit {} {\n\ global tk_library tk_version tk_patchLevel env errorInfo\n\ rename tkInit {}\n\ set errors \"\"\n\ @@ -71,6 +76,7 @@ static char initScript[] = append msg \"$errors\n\n\"\n\ append msg \"This probably means that Tk wasn't installed properly.\n\"\n\ error $msg\n\ + }\n\ }\n\ tkInit"; |