From: sls Date: Fri, 23 Jun 1995 07:20:14 +0000 (+0000) Subject: Handle windows with special characters in them. X-Git-Tag: r5_1_5~3 X-Git-Url: http://privyetmir.co.uk/gitweb?a=commitdiff_plain;h=e83fba583587dbce7da88ff0283a9cd60c7c825e;p=tkinspect Handle windows with special characters in them. --- diff --git a/windows_info.tcl b/windows_info.tcl index 64b02ae..5c2db3e 100644 --- a/windows_info.tcl +++ b/windows_info.tcl @@ -18,7 +18,7 @@ object_class windows_info { method get_windows {} { return $slot(windows) } method append_windows {target result_var parent} { upvar $result_var result - foreach w [send $target winfo children $parent] { + foreach w [send $target [list winfo children $parent]] { lappend slot(windows) $w $self append_windows $target result $w } @@ -38,7 +38,7 @@ object_class windows_info { } method get_class {target w} { if ![info exists slot($w.class)] { - if ![send $target winfo exists $w] { + if ![send $target [list winfo exists $w]] { # the window no longer exists, so delete it from our list set ndx [lsearch -exact $slot(windows) $w] if {$ndx >= 0} { diff --git a/windows_list.tcl b/windows_list.tcl index 7b91f78..7216f32 100644 --- a/windows_list.tcl +++ b/windows_list.tcl @@ -82,8 +82,8 @@ widget windows_list { return $result } method retrieve_config {target window} { - set result "# window configuration of $window\n" - append result "$window config" + set result "# window configuration of [list $window]\n" + append result "[list $window] config" foreach spec [send $target [list $window config]] { if {[llength $spec] == 2} continue append result " \\\n\t[lindex $spec 0] [list [lindex $spec 4]]" @@ -93,7 +93,7 @@ widget windows_list { } method format_packing_info {result_var window info} { upvar $result_var result - append result "pack configure $window" + append result "pack configure [list $window]" set len [llength $info] for {set i 0} {$i < $len} {incr i 2} { append result " \\\n\t[lindex $info $i] [lindex $info [expr $i+1]]" @@ -101,8 +101,8 @@ widget windows_list { append result "\n" } method retrieve_packing {target window} { - set result "# packing info for $window\n" - if [catch {send $target pack info $window} info] { + set result "# packing info for [list $window]\n" + if [catch {send $target [list pack info $window]} info] { append result "# $info\n" } else { $self format_packing_info result $window $info @@ -110,49 +110,49 @@ widget windows_list { return $result } method retrieve_slavepacking {target window} { - set result "# packing info for slaves of $window\n" - foreach slave [send $target pack slaves $window] { + set result "# packing info for slaves of [list $window]\n" + foreach slave [send $target [list pack slaves $window]] { $self format_packing_info result $slave \ - [send $target pack info $slave] + [send $target [list pack info $slave]] } return $result } method retrieve_bindtags {target window} { - set result "# bindtags of $window\n" + set result "# bindtags of [list $window]\n" set tags [send $target [list bindtags $window]] append result [list bindtags $window $tags] append result "\n" return $result } method retrieve_bindtagsplus {target window} { - set result "# bindtags of $window\n" + set result "# bindtags of [list $window]\n" set tags [send $target [list bindtags $window]] append result [list bindtags $window $tags] append result "\n# bindings (in bindtag order)..." foreach tag $tags { - foreach sequence [send $target bind $tag] { + foreach sequence [send $target [list bind $tag]] { append result "\nbind $tag $sequence " - lappend result [send $target bind $tag $sequence] + lappend result [send $target [list bind $tag $sequence]] } } append result "\n" return $result } method retrieve_bindings {target window} { - set result "# bindings of $window" - foreach sequence [send $target bind $window] { + set result "# bindings of [list $window]" + foreach sequence [send $target [list bind $window]] { append result "\nbind $window $sequence " - lappend result [send $target bind $window $sequence] + lappend result [send $target [list bind $window $sequence]] } append result "\n" return $result } method retrieve_classbindings {target window} { - set class [send $target winfo class $window] + set class [$slot(main) windows_info get_class $target $window] set result "# class bindings for $window\n# class: $class" - foreach sequence [send $target bind $class] { + foreach sequence [send $target [list bind $class]] { append result "\nbind $class $sequence " - lappend result [send $target bind $class $sequence] + lappend result [send $target [list bind $class $sequence]] } append result "\n" return $result