Tk Library Source Code

Artifact [22fe3e64fd]
Login

Artifact 22fe3e64fd10f5f6b99192b3f8ac52669950bddd:

Attachment "cw.diff" to ticket [bac1ff5030] added by stwo 2013-09-18 16:04:27.
Index: examples/controlwidget/demo-rdial.tcl
==================================================================
--- examples/controlwidget/demo-rdial.tcl
+++ examples/controlwidget/demo-rdial.tcl
@@ -1,5 +1,11 @@
+#! /bin/sh
+# The next line restarts with tclsh \
+exec tclsh "$0" ${1+"$@"}
+
+package require Tk
+
 # demo-rdial.tcl --
 
 package require controlwidget
 
 array set disp_value {rs -30.0 rh 120.0 rv 10.0}

Index: examples/controlwidget/demo-tachometer.tcl
==================================================================
--- examples/controlwidget/demo-tachometer.tcl
+++ examples/controlwidget/demo-tachometer.tcl
@@ -1,5 +1,11 @@
+#! /bin/sh
+# The next line restarts with tclsh \
+exec tclsh "$0" ${1+"$@"}
+
+package require Tk
+
 # demo-tachometer.tcl --
 
 package require controlwidget
 
 # main --
@@ -27,15 +33,15 @@
     button .b -text Quit -command "set ::forever 1"
 
     grid .t1 .s1 .t2 .s2 .b -padx 2 -pady 2
     wm deiconify .
 
-    console show
+    catch { console show }
 
 
     vwait forever
     #tachometer::destructor .t1
     #tachometer::destructor .t2
     exit 0
 }
 
 main $argc $argv

Index: examples/controlwidget/demo-voltmeter.tcl
==================================================================
--- examples/controlwidget/demo-voltmeter.tcl
+++ examples/controlwidget/demo-voltmeter.tcl
@@ -1,5 +1,11 @@
+#! /bin/sh
+# The next line restarts with tclsh \
+exec tclsh "$0" ${1+"$@"}
+
+package require Tk
+
 # demo-voltmeter.tcl --
 
 package require controlwidget
 
 # main --