44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
-
+
+
+
+
+
+
+
+
+
+
+
|
$m.debug add command -label "Edit" -command ProcEditor -underline 0
return $m.debug
}
proc ProcEditorUpdate {a k} {
# Only update on keys generating characters
if {$a eq ""} return
if {$a eq "" || ![string is graph $a]} return
#puts "Key '$a' '$k'"
set p [info procs $::ProcEditor(proc)]
if {$p eq "" && $::ProcEditor(proc) ne ""} {
# Try prefix matching
set p [info procs $::ProcEditor(proc)*]
# Include namespaces if starting with ::
if {[string match "::*" $::ProcEditor(proc)]} {
if {[regexp {^(.*::)([^:]*)$} $::ProcEditor(proc) -> ns pat]} {
if {[namespace exists $ns]} {
set child [namespace children $ns $pat*]
lappend p {*}$child
}
}
}
}
set p [lsort -dictionary $p]
$::ProcEditor(procW) configure -values $p
# Keep the first
set p [lindex $p 0]
if {$p eq ""} {
|