summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authortreectrl <treectrl>2006-11-19 00:54:45 (GMT)
committertreectrl <treectrl>2006-11-19 00:54:45 (GMT)
commita2bc1d80dc6cdba9371e28ea924dd7026b084bf5 (patch)
tree5762d9a605a0e6ab228fdc71a2ecfa1e35e77a6a /demos
parente2e5e9b30df462e14f186b9c1c56882e18dd59a2 (diff)
downloadtktreectrl-a2bc1d80dc6cdba9371e28ea924dd7026b084bf5.zip
tktreectrl-a2bc1d80dc6cdba9371e28ea924dd7026b084bf5.tar.gz
tktreectrl-a2bc1d80dc6cdba9371e28ea924dd7026b084bf5.tar.bz2
Use lassign instead of the classic foreach hack.
Use [column tag expr] instead of examining the tags directly.
Diffstat (limited to 'demos')
-rw-r--r--demos/mailwasher.tcl7
1 files changed, 3 insertions, 4 deletions
diff --git a/demos/mailwasher.tcl b/demos/mailwasher.tcl
index a6bafd1..f87e97c 100644
--- a/demos/mailwasher.tcl
+++ b/demos/mailwasher.tcl
@@ -1,4 +1,4 @@
-# RCS: @(#) $Id: mailwasher.tcl,v 1.14 2006/10/28 01:26:37 treectrl Exp $
+# RCS: @(#) $Id: mailwasher.tcl,v 1.15 2006/11/19 00:54:45 treectrl Exp $
#
# Demo: MailWasher
@@ -181,10 +181,9 @@ proc DemoMailWasher {} {
if {$id eq ""} {
} elseif {[lindex $id 0] eq "header"} {
} else {
- foreach {what item where arg1 arg2 arg3} $id {}
+ lassign $id what item where arg1 arg2 arg3
if {$where eq "column"} {
- set tag [%W column cget $arg1 -tags]
- if {$tag eq "delete" || $tag eq "bounce"} {
+ if {[%W column tag expr $arg1 {delete || bounce}]} {
%W item state forcolumn $item $arg1 ~CHECK
# return -code break
}