* tkinspect.tcl: Improved the dde send implementation and fixed
the window title to show the application name.
+ * globals_list.tcl: Bug #533164: Fixed the retrieve for empty
+ arrays.
Thu Mar 21 00:32:17 2002 Pat Thoyts <patthoyts@users.sourceforge.net>
}
}
method retrieve {target var} {
- if ![send $target [list array size $var]] {
+ if ![send $target [list array exists $var]] {
return [list set $var [send $target [list set $var]]]
}
set result {}
- foreach elt [lsort [send $target [list array names $var]]] {
- append result [list set [set var]($elt) \
- [send $target [list set [set var]($elt)]]]
- append result "\n"
- }
+ set names [lsort [send $target [list array names $var]]]
+ if {[llength $names] == 0} {
+ append result "array set $var {}\n"
+ } else {
+ foreach elt $names {
+ append result [list set [set var]($elt) \
+ [send $target [list set [set var]($elt)]]]
+ append result "\n"
+ }
+ }
return $result
}
method send_filter {value} {