aboutsummaryrefslogtreecommitdiff
path: root/test/toxy/default.wid
diff options
context:
space:
mode:
authorN.N. <krzyszcz@users.sourceforge.net>2004-02-25 10:54:43 +0000
committerN.N. <krzyszcz@users.sourceforge.net>2004-02-25 10:54:43 +0000
commit4a4b32ee7dcadb961f7d0feea109a61c92306e47 (patch)
treea93af61713ef025fa68601cc86993e95e1905595 /test/toxy/default.wid
parentd0f6986345970955d6390a6953c35babf587c262 (diff)
widget tracing backward compatible to tcl8.3
svn path=/trunk/externals/miXed/; revision=1359
Diffstat (limited to 'test/toxy/default.wid')
-rw-r--r--test/toxy/default.wid26
1 files changed, 21 insertions, 5 deletions
diff --git a/test/toxy/default.wid b/test/toxy/default.wid
index f3f549f..5553c92 100644
--- a/test/toxy/default.wid
+++ b/test/toxy/default.wid
@@ -29,10 +29,18 @@ proc ::toxy::itemsettrace {op path target varname} {
error $err
}
} else {
- trace add variable $res write "::toxy::itembindtrace $varname"
+ if {[info tclversion] < 8.4} {
+ trace variable $res w "::toxy::itembindtrace $varname"
+ } else {
+ trace add variable $res write "::toxy::itembindtrace $varname"
+ }
}
if {![info exists $varname.last]} { set $varname.last "" }
- trace add variable $varname write "::toxy::itemdotrace $target"
+ if {[info tclversion] < 8.4} {
+ trace variable $varname w "::toxy::itemdotrace $target"
+ } else {
+ trace add variable $varname write "::toxy::itemdotrace $target"
+ }
return
} else { return 0 }
}
@@ -45,8 +53,12 @@ proc ::toxy::itemremovetrace {op path varname} {
error $err
}
} elseif {$res != ""} {
- catch { trace remove variable \
- $res write "::toxy::itembindtrace $varname" }
+ if {[info tclversion] < 8.4} {
+ catch { trace vdelete $res w "::toxy::itembindtrace $varname" }
+ } else {
+ catch { trace remove variable \
+ $res write "::toxy::itembindtrace $varname" }
+ }
}
}
}
@@ -54,7 +66,11 @@ proc ::toxy::itemremovetrace {op path varname} {
proc ::toxy::itemdestroy {path varname} {
::toxy::itemremovetrace -variable $path $varname.var
::toxy::itemremovetrace -textvariable $path $varname.txt
- unset -nocomplain $varname.last $varname.var $varname.txt $varname
+ if {[info tclversion] < 8.4} {
+ catch { unset $varname.last $varname.var $varname.txt $varname }
+ } else {
+ unset -nocomplain $varname.last $varname.var $varname.txt $varname
+ }
catch {destroy $path}
}