Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30275
Modified Files: Tag: devel_0_39 desire.tk Log Message: first commit to fix the ; and $ bugs in messagebox
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.559 retrieving revision 1.1.2.560 diff -C2 -d -r1.1.2.559 -r1.1.2.560 *** desire.tk 17 Nov 2006 18:26:21 -0000 1.1.2.559 --- desire.tk 18 Nov 2006 16:09:33 -0000 1.1.2.560 *************** *** 1909,1912 **** --- 1909,1917 ---- set @y1 [lindex $mess 3] set @text [lrange $mess 4 end] + set c [lindex $mess 4] + set c_pos [string first $c $mess 0] + set s [string range $mess $c_pos end] + regsub -all {\} $s "" text + set @text $text set @longline 0 } *************** *** 1922,1926 **** if {$@edit} { set t [$@canvas widget].${self}text - puts " t::: $t" $self item text window [list [expr $x1+2] [expr $y1+2]] \ -window $t -anchor nw -tags "${self}text $self text" --- 1927,1930 ---- *************** *** 4261,4271 **** #A 0 0; proc update_object {self e ninlets noutlets} { ! foreach mess [split $e ";"] {update_object_2 $self $mess} if {[lindex $e 1] == "array"} { ! $self ninlets= 0 ! $self noutlets= 0 } else { ! $self ninlets= $ninlets ;# bogus in case of array ! $self noutlets= $noutlets } $self changed --- 4265,4276 ---- #A 0 0; proc update_object {self e ninlets noutlets} { ! parse_line $self $e ! #foreach mess [split $e ";"] {update_object_2 $self $mess} if {[lindex $e 1] == "array"} { ! $self ninlets= 0 ! $self noutlets= 0 } else { ! $self ninlets= $ninlets ;# bogus in case of array ! $self noutlets= $noutlets } $self changed *************** *** 4318,4321 **** --- 4323,4342 ---- }
+ proc parse_line {self e} { + #first replace every "\n" by a " ", then replace every "\;" by a "\n", then + #split on ";", then replace every "\n" by a "\;" + + regsub -all "\n" $e " " y + regsub -all {\;} $y "\n" z + foreach mess [split $z ";"] { + if {$mess != ""} { + regsub -all "\n" $mess "\;" x + update_object_2 $self [string trimleft $x] + } + + } + } + + ############ rendering