summaryrefslogtreecommitdiffstats
path: root/library/demos
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-08 06:23:40 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-08 06:23:40 (GMT)
commitdc2c36cea500db6933ade16c3252cef0a66ab26d (patch)
tree0b7650bc7c53e1dca25ec6facfe279368c9046a6 /library/demos
parent6f2824501d0987043c6456d5ab00adbb4300b682 (diff)
downloadtk-dc2c36cea500db6933ade16c3252cef0a66ab26d.zip
tk-dc2c36cea500db6933ade16c3252cef0a66ab26d.tar.gz
tk-dc2c36cea500db6933ade16c3252cef0a66ab26d.tar.bz2
Simplify throughout: ButtonPress -> Button, KeyPress -> Key (or remove it because it is the default anyway)
Use 'in' operator in stead of 'lsearch -exact' when possible
Diffstat (limited to 'library/demos')
-rw-r--r--library/demos/knightstour.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/demos/knightstour.tcl b/library/demos/knightstour.tcl
index 3c29720..b5cffa8 100644
--- a/library/demos/knightstour.tcl
+++ b/library/demos/knightstour.tcl
@@ -218,7 +218,7 @@ proc CreateGUI {} {
-fill black -activefill "#600000"
}
$c moveto knight {*}[lrange [$c coords [expr {1 + int(rand() * 64)}]] 0 1]
- $c bind knight <ButtonPress-1> [namespace code [list DragStart %W %x %y]]
+ $c bind knight <Button-1> [namespace code [list DragStart %W %x %y]]
$c bind knight <Motion> [namespace code [list DragMotion %W %x %y]]
$c bind knight <ButtonRelease-1> [namespace code [list DragEnd %W %x %y]]