diff options
author | jingham <jingham> | 1999-06-16 05:33:58 (GMT) |
---|---|---|
committer | jingham <jingham> | 1999-06-16 05:33:58 (GMT) |
commit | 52b3b0b8d6400edb039bb91df5b0cba105ee1290 (patch) | |
tree | f7bb109ba27f45b2487a646b4af72e62b027c80a /mac/tkMacAppInit.c | |
parent | 14bec5406c11563f3f435af1491be48e6751f480 (diff) | |
download | tk-52b3b0b8d6400edb039bb91df5b0cba105ee1290.zip tk-52b3b0b8d6400edb039bb91df5b0cba105ee1290.tar.gz tk-52b3b0b8d6400edb039bb91df5b0cba105ee1290.tar.bz2 |
Have to call Tcl_FindExecutable BEFORE creating the first interpreter. Need to do this in main, since Tk_Main surreptitiously creates the interpreter now.
Diffstat (limited to 'mac/tkMacAppInit.c')
-rw-r--r-- | mac/tkMacAppInit.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mac/tkMacAppInit.c b/mac/tkMacAppInit.c index 9d27ca7..9772f36 100644 --- a/mac/tkMacAppInit.c +++ b/mac/tkMacAppInit.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacAppInit.c,v 1.10 1999/05/22 06:32:08 jingham Exp $ + * RCS: @(#) $Id: tkMacAppInit.c,v 1.11 1999/06/16 05:33:58 jingham Exp $ */ #include <Gestalt.h> @@ -23,6 +23,7 @@ #include "tk.h" #include "tkInt.h" #include "tkMacInt.h" +#include "tclInt.h" #include "tclMac.h" #ifdef TK_TEST @@ -95,6 +96,15 @@ main( argc = 1; newArgv[0] = "Wish"; newArgv[1] = NULL; + + /* Tk_Main is actually #defined to + * Tk_MainEx(argc, argv, Tcl_AppInit, Tcl_CreateInterp()) + * Unfortunately, you also HAVE to call Tcl_FindExecutable + * BEFORE creating the first interp, or the tcl_library will not + * get set properly. So we call it by hand here... + */ + + Tcl_FindExecutable(newArgv[0]); Tk_Main(argc, newArgv, Tcl_AppInit); } |