From: Mats B. <ma...@pr...> - 2001-02-10 16:46:15
|
Since I posted the bug, I can fill in some more. Actually, I tried to dig into it a few days ago: [info script] just returns the value in 'interp->scriptFile'. scriptFile is initially set to NULL, but in Tcl_EvalFile(..., fileName), scriptFile = fileName, and then the fileName is sourced in and evaluated. When finished, scriptFile is set to the value it had before. The source command actually calls Tcl_EvalFile(..., fileName). (in tclCmdMZ.c file) When doing source from the console, everything seems to work alright. However, the source from the menu command calls the 'SourceDialog()' function in tk/mac/tkMacMenus.c file, and the SourceDialog() function first calls Tcl_Eval("tk_getOpenFile") then Tcl_EvalFile(..., fileName). Note that the script based console in tk/library/console.tcl seems to work Ok, at least if you just evaluate the script associated with the source menu. This method is not used in the current version of MacTk. I don't understand what is going wrong here, but this is the flow of calls. Mats |