From a2bc1d80dc6cdba9371e28ea924dd7026b084bf5 Mon Sep 17 00:00:00 2001 From: treectrl Date: Sun, 19 Nov 2006 00:54:45 +0000 Subject: Use lassign instead of the classic foreach hack. Use [column tag expr] instead of examining the tags directly. --- demos/mailwasher.tcl | 7 +++---- 1 file 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 } -- cgit v0.12