summaryrefslogtreecommitdiffstats
path: root/library/demos/bind.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-11-03 15:30:45 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-11-03 15:30:45 (GMT)
commitc0164ce633713cc59b867c0a5b713be33fa51593 (patch)
tree85e4cc9231f1d3d491a3a13dfe56c421c2572707 /library/demos/bind.tcl
parent2850c445d0a092a29a4bb8fc7872bdf1b8e77013 (diff)
downloadtk-c0164ce633713cc59b867c0a5b713be33fa51593.zip
tk-c0164ce633713cc59b867c0a5b713be33fa51593.tar.gz
tk-c0164ce633713cc59b867c0a5b713be33fa51593.tar.bz2
Make demo location independent of main Tk library location. [Patch 832691]
Diffstat (limited to 'library/demos/bind.tcl')
-rw-r--r--library/demos/bind.tcl15
1 files changed, 8 insertions, 7 deletions
diff --git a/library/demos/bind.tcl b/library/demos/bind.tcl
index 246683a..81ad642 100644
--- a/library/demos/bind.tcl
+++ b/library/demos/bind.tcl
@@ -3,7 +3,7 @@
# This demonstration script creates a text widget with bindings set
# up for hypertext-like effects.
#
-# RCS: @(#) $Id: bind.tcl,v 1.3 2003/08/20 23:02:18 hobbs Exp $
+# RCS: @(#) $Id: bind.tcl,v 1.4 2003/11/03 15:31:18 dkf Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -66,12 +66,13 @@ foreach tag {d1 d2 d3 d4 d5 d6} {
$w.text tag bind $tag <Any-Enter> "$w.text tag configure $tag $bold"
$w.text tag bind $tag <Any-Leave> "$w.text tag configure $tag $normal"
}
-$w.text tag bind d1 <1> {source [file join $tk_library demos items.tcl]}
-$w.text tag bind d2 <1> {source [file join $tk_library demos plot.tcl]}
-$w.text tag bind d3 <1> {source [file join $tk_library demos ctext.tcl]}
-$w.text tag bind d4 <1> {source [file join $tk_library demos arrow.tcl]}
-$w.text tag bind d5 <1> {source [file join $tk_library demos ruler.tcl]}
-$w.text tag bind d6 <1> {source [file join $tk_library demos cscroll.tcl]}
+# Main widget program sets variable tk_demoDirectory
+$w.text tag bind d1 <1> {source [file join $tk_demoDirectory items.tcl]}
+$w.text tag bind d2 <1> {source [file join $tk_demoDirectory plot.tcl]}
+$w.text tag bind d3 <1> {source [file join $tk_demoDirectory ctext.tcl]}
+$w.text tag bind d4 <1> {source [file join $tk_demoDirectory arrow.tcl]}
+$w.text tag bind d5 <1> {source [file join $tk_demoDirectory ruler.tcl]}
+$w.text tag bind d6 <1> {source [file join $tk_demoDirectory cscroll.tcl]}
$w.text mark set insert 0.0
$w.text configure -state disabled