Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3668
Modified Files: Tag: devel_0_39 desire.c desire.tk Log Message: abortion prevention...
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.377 retrieving revision 1.1.2.378 diff -C2 -d -r1.1.2.377 -r1.1.2.378 *** desire.tk 19 Aug 2006 18:42:27 -0000 1.1.2.377 --- desire.tk 20 Aug 2006 01:00:44 -0000 1.1.2.378 *************** *** 412,416 ****
#temporary ! set leet 1
proc say {k args} { --- 412,416 ----
#temporary ! set leet 0
proc say {k args} { *************** *** 421,428 **** if {[info exist text($k)]} { if {$leet} { ! set l33t [string map -nocase {a 4 e 3 t 7 s 5 i 1 o 0 g 9} $text($k)] ! return $l33t} else {return $text($k)} ! #return $text($k) ! } else {return "{{$k}}"} } } --- 421,429 ---- if {[info exist text($k)]} { if {$leet} { ! return [string map -nocase {a 4 e 3 t 7 s 5 i 1 o 0 g 9} $text($k)] ! } else { ! return $text($k) ! } ! } else {return "{{$k}}"} } } *************** *** 1246,1249 **** --- 1247,1253 ---- def Canvas redo {} {$@history redo}
+ #N canvas 0 0 450 300 graph2 0; + #X restore 123 271 graph; + #!@#$ this method is too long. def Canvas init {x1 y1 xs ys args} { *************** *** 1270,1274 **** set @bbox {0 0 100 100} set @children {} - set @unborn {} set @obj_in_edit {} set @dehighlight {} --- 1274,1277 ---- *************** *** 1777,1799 **** # think of the children!!! # should be only called from the server def Canvas children= {children} { set new [lwithout $children $@children] set dead [lwithout $@children $children] ! foreach x [lreverse $dead] { ! $x unsubscribe $self ! #$@history can't ;# need a way to instantiate objects with a specific index. ! # THIS IS NOT WHERE HISTORY ADD IS SUPPOSED TO BE! ! # it's supposed to be on the user end! ! #$@history add [list $self ins [lsearch $@children $x] [$x deconstruct]] ! $x erase ! } ! foreach x $new { ! ###$@history add [list $self del [lsearch $children $x]] ! if {[info exists _($x:_class)]} { ! $x subscribe $self; $x changed; $x canvas= $self ! } else { ! lappend @unborn $x ! } ! } set @children $children $self changed --- 1780,1790 ---- # think of the children!!! # should be only called from the server + # THIS IS NOT WHERE HISTORY ADD IS SUPPOSED TO BE! + # it's supposed to be on the user end! def Canvas children= {children} { set new [lwithout $children $@children] set dead [lwithout $@children $children] ! foreach x [lreverse $dead] {$x unsubscribe $self; $x erase} ;# should use _delete instead? ! foreach x $new {$x subscribe $self; $x changed; $x canvas= $self} set @children $children $self changed *************** *** 1814,1826 **** set find [lsearch $@wires_pair $x] if {$find == -1} {# new wire!!! ! if {[info exists _($obj1:_class)] && [info exists _($obj2:_class)]} { ! lappend @wires_pair [list $outobj $outport $inobj $inport] ! set new_wire [eval [list Wire_new $self $outobj $outport $inobj $inport]] ! lappend @wires_pair $new_wire ! lappend wires $new_wire ! } else { ! puts "$obj1 or $obj2 not born yet" ! set @unborn_wire [lappend @unborn_wire $x] ! } } else {# wire already exists lappend wires [lindex $@wires_pair [expr $find + 1]] --- 1805,1812 ---- set find [lsearch $@wires_pair $x] if {$find == -1} {# new wire!!! ! lappend @wires_pair [list $outobj $outport $inobj $inport] ! set new_wire [eval [list Wire_new $self $outobj $outport $inobj $inport]] ! lappend @wires_pair $new_wire ! lappend wires $new_wire } else {# wire already exists lappend wires [lindex $@wires_pair [expr $find + 1]] *************** *** 3119,3122 **** --- 3105,3111 ---- } } + "#A" { + post "#A: $mess" + } "#V" { post "#V: $mess" *************** *** 3125,3152 **** } } - update_object_3 $self $mess $self changed }
- # proc for treating race conditions - # shouldn't be needed (please replace this by something more solid) - proc update_object_3 {self e} { - global canvas _ - set c $canvas(current) - set unborn_children [lsearch $_($c:unborn) $self] - if {$unborn_children<0} {return} - $self canvas= $c - $self subscribe $c - $self changed - if {$unborn_children == [expr [llength $_($c:unborn)] - 1]} { - # when it reaches the last unborn child, its time to draw the wires - set _($c:unborn) "" - if {[info exists _($c:unborn_wire)]} { - $c wires= $_($c:unborn_wire) - unset _($c:unborn_wire) - } - } - } - ############ rendering
--- 3114,3120 ----
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.106 retrieving revision 1.1.2.107 diff -C2 -d -r1.1.2.106 -r1.1.2.107 *** desire.c 20 Aug 2006 00:30:23 -0000 1.1.2.106 --- desire.c 20 Aug 2006 01:00:44 -0000 1.1.2.107 *************** *** 4967,4971 **** free(buf); gobj_subscribe(y,(t_gobj *)x); ! gobj_changed(y,0); y->g_next = 0; if (!x->gl_list) x->gl_list = y; --- 4967,4976 ---- free(buf); gobj_subscribe(y,(t_gobj *)x); ! ! /* delay first uploading of object (DesireData <= 2006.08.19) */ ! /* gobj_changed(y,0); */ ! /* don't delay first uploading of object (DesireData >= 2006.08.19) */ ! pd_upload(y); ! y->g_next = 0; if (!x->gl_list) x->gl_list = y;