summaryrefslogtreecommitdiffstats
path: root/library/demos/knightstour.tcl
diff options
context:
space:
mode:
authordas <das>2009-04-10 16:34:46 (GMT)
committerdas <das>2009-04-10 16:34:46 (GMT)
commit5c94825d097ef13059746ef51cf7d3567e5e5c05 (patch)
treec5bca9be43146256e397367dc346d835ec11fc0c /library/demos/knightstour.tcl
parent31a39a76334a12ed604b7a3fc1f1c939251d22cf (diff)
downloadtk-5c94825d097ef13059746ef51cf7d3567e5e5c05.zip
tk-5c94825d097ef13059746ef51cf7d3567e5e5c05.tar.gz
tk-5c94825d097ef13059746ef51cf7d3567e5e5c05.tar.bz2
* library/demos/knightstour.tcl: fix knightstour demo not running from
interactive wish.
Diffstat (limited to 'library/demos/knightstour.tcl')
-rw-r--r--library/demos/knightstour.tcl16
1 files changed, 6 insertions, 10 deletions
diff --git a/library/demos/knightstour.tcl b/library/demos/knightstour.tcl
index 89e294b..73ca3a3 100644
--- a/library/demos/knightstour.tcl
+++ b/library/demos/knightstour.tcl
@@ -258,15 +258,11 @@ proc CreateGUI {} {
tkwait window $dlg
}
-if {$tcl_interactive} {
- if {[info exists widgetDemo]} { CreateGUI }
-} else {
- if {![winfo exists .knightstour]} {
- if {![info exists widgetDemo]} { wm withdraw . }
- set r [catch [linsert $argv 0 CreateGUI] err]
- if {$r} {
- tk_messageBox -icon error -title "Error" -message $err
- }
- if {![info exists widgetDemo]} { exit $r }
+if {![winfo exists .knightstour]} {
+ if {![info exists widgetDemo]} { wm withdraw . }
+ set r [catch [linsert $argv 0 CreateGUI] err]
+ if {$r} {
+ tk_messageBox -icon error -title "Error" -message $err
}
+ if {![info exists widgetDemo]} { exit $r }
}