Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6132
Modified Files:
Tag: desiredata
desire.tk
Log Message:
canvas evaluator also displays args in the completion display
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.171
retrieving revision 1.1.2.600.2.172
diff -C2 -d -r1.1.2.600.2.171 -r1.1.2.600.2.172
*** desire.tk 23 Jan 2007 17:59:30 -0000 1.1.2.600.2.171
--- desire.tk 23 Jan 2007 19:51:00 -0000 1.1.2.600.2.172
***************
*** 3097,3101 ****
label $f.cmd_l -text Command: -font {helvetica -10} -pady 0
pack $f.cmd_l -side left
! entry $f.cmd -width 50 -relief flat -bg white -borderwidth 0 \
-highlightthickness 0
bind $f.cmd <Escape> "$self delete"
--- 3097,3101 ----
label $f.cmd_l -text Command: -font {helvetica -10} -pady 0
pack $f.cmd_l -side left
! entry $f.cmd -width 30 -relief flat -bg white -borderwidth 0 \
-highlightthickness 0
bind $f.cmd <Escape> "$self delete"
***************
*** 3142,3146 ****
def Runcommand run {} {
set f [$self widget]
! if {[winfo exists $f.completion]} {$self replace $@comp; destroy $f.completion; return}
set text [$f.cmd get]
$@canvas cmd_history+ $text
--- 3142,3151 ----
def Runcommand run {} {
set f [$self widget]
! if {[winfo exists $f.completion]} {
! puts "string:: [string range $@comp 0 [string first ":" $@comp 0]]"
! $self replace [string range $@comp 0 [expr [string first ":" $@comp 0]-1]]
! destroy $f.completion
! return
! }
set text [$f.cmd get]
$@canvas cmd_history+ $text
***************
*** 3158,3161 ****
--- 3163,3167 ----
def Runcommand completion {which} {
+ #global __args
set f [$self widget]
set text [$f.cmd get]
***************
*** 3164,3171 ****
set @completions {}
set @comp_i 0
! foreach def $@defs {if {[regexp ^$@comp_s $def]} {post %s $def; lappend @completions $def}}
}
if {![llength $@completions]} return
! set @comp [lindex $@completions $@comp_i]
if {$which == "+"} {
set @comp_i [expr ($@comp_i+1)%[llength $@completions]]
--- 3170,3182 ----
set @completions {}
set @comp_i 0
! foreach def $@defs {if {[regexp ^$@comp_s $def]} {lappend @completions $def}}
}
if {![llength $@completions]} return
! set def [lindex $@completions $@comp_i]
! if {[lindex $::__args(Canvas_$def) 0] == "self"} {
! set args [lreplace $::__args(Canvas_$def) 0 0]
! } else {set args $::__args(Canvas_$def)}
! if {![llength $args]} {set args "none"}
! set @comp [join [list $def ":" $args]]
if {$which == "+"} {
set @comp_i [expr ($@comp_i+1)%[llength $@completions]]