From: Bernhard S. <Ber...@gm...> - 2005-01-03 21:38:43
|
On 03.01.2005, at 20:29, Jim Ingham wrote: > Not entirely sure what the real answer should be here. When > double-clicked from the Finder, Wish will generally start up the > console package, so you have a way to enter commands. But of course, > you can choose to hide the console. Maybe we should trigger > "interactive" off whether the console is hidden or not? > > What are you trying to use it for? Jim, Csaba, Well, I'm not really using it. I just stumbled over it while debugging another problem. The problem crept up with AquaTkBI 8.4.9 in combination with the TableList widget (http://www.nemethi.de) which I am using for table functionality. The author of the TableList widget uses tcl_interactive in one of his demo scripts which I tried to isolate my problem with the widget. But the demo script ('config.tcl') failed to run due to tcl_interactive giving 0 on Aqua. The code which uses the variable is below and just assures that the user gets a message how to call a certain demo. > if {$tcl_interactive} { > return "\nTo display the configuration options of an arbitrary\ > widget, enter\n\n\tdemo::displayConfig <widgetName>\n" > } else { > wm withdraw . > tk_messageBox -icon warning -title $argv0 -type ok -message \ > "Please source this script into\nan interactive wish session" > exit 1 > } I am not sure however in which cases the else part of this code would be executed and what it is intended for. Perhaps the author could tell us. Apart from this, the most natural behavior of tcl_interactive would be for me: - 1: if wish is started without any script being sourced - 0: if some script is being sourced automatically (e.g. AppMain.tcl) But I may not see many other cases where this simple scheme might break. Bernhard > > Jim > > On Dec 25, 2004, at 2:04 AM, Bernhard Spinnler wrote: > >> I just installed AquaTkBI 8.4.9 and noticed that in Wish (when >> double-clicked in the Finder) >> >> set tcl_interactive >> >> gives 0. I thought that previously the (correct?) result was 1. >> >> BTW, in wish started from the terminal the same statement gives 1. >> Both 'wishes' report 8.4.9 as tk_patchLevel. I am not quite sure, >> however, whether this behavior was introduced in 8.4.9 or existed in >> earlier versions. >> >> Cheers, >> Bernhard >> |