summaryrefslogtreecommitdiffstats
path: root/library/treectrl.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/treectrl.tcl')
-rw-r--r--library/treectrl.tcl13
1 files changed, 10 insertions, 3 deletions
diff --git a/library/treectrl.tcl b/library/treectrl.tcl
index 11cdb97..c401871 100644
--- a/library/treectrl.tcl
+++ b/library/treectrl.tcl
@@ -1,4 +1,4 @@
-# RCS: @(#) $Id: treectrl.tcl,v 1.34 2006/11/18 04:37:49 treectrl Exp $
+# RCS: @(#) $Id: treectrl.tcl,v 1.35 2006/11/19 00:49:36 treectrl Exp $
bind TreeCtrl <Motion> {
TreeCtrl::CursorCheck %W %x %y
@@ -196,6 +196,13 @@ namespace eval ::TreeCtrl {
array set Priv {
prev {}
}
+
+ if {[info procs ::lassign] eq ""} {
+ proc lassign {values args} {
+ uplevel 1 [list foreach $args [linsert $values end {}] break]
+ lrange $values [llength $args] end
+ }
+ }
}
# Retrieve filelist bindings from this dir
@@ -433,7 +440,7 @@ proc ::TreeCtrl::ButtonPress1 {w x y} {
}
if {[lindex $id 0] eq "item"} {
- foreach {where item arg1 arg2} $id {}
+ lassign $id where item arg1 arg2
if {$arg1 eq "button"} {
$w item toggle $item
return
@@ -503,7 +510,7 @@ proc ::TreeCtrl::DoubleButton1 {w x y} {
return
}
if {[lindex $id 0] eq "item"} {
- foreach {where item arg1 arg2} $id {}
+ lassign $id where item arg1 arg2
if {$arg1 eq "button"} {
$w item toggle $item
return