Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30708
Modified Files: Tag: devel_0_39 desire.tk Log Message: trying to fix some wire code and realised that its a mess and no time to work on it more now.... and i am hungry
will do it a bit later
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.143 retrieving revision 1.1.2.144 diff -C2 -d -r1.1.2.143 -r1.1.2.144 *** desire.tk 15 Feb 2006 17:04:11 -0000 1.1.2.143 --- desire.tk 18 Feb 2006 15:40:57 -0000 1.1.2.144 *************** *** 994,998 **** set @dehighlight {} set @wires {} ! set @wire_hilite {} global history set @history $history --- 994,998 ---- set @dehighlight {} set @wires {} ! #set @wire_hilite {} global history set @history $history *************** *** 1428,1431 **** --- 1428,1432 ----
def* canvas wires= {wires2} { + puts "-----------------------------------------lol" set wires {} #set born [lwithout $wires $@wires]; foreach x $born {$x subscribe $self; $x changed; $x canvas= $self} *************** *** 1442,1449 **** --- 1443,1452 ---- } } + puts "wires: $wires" set born [lwithout $wires $@wires]; foreach x $born {$x subscribe $self; $x changed; $x canvas= $self} puts "===== born:$born" set dead [lwithout $@wires $wires]; foreach x $dead {$x unsubscribe $self; $x erase} + puts "===== dead:$dead" set @wires $wires puts "===== [concat [list wire_new $self]]" *************** *** 1667,1671 **** foreach o $@selection {$o selected?= 0} set @selection {} ! if {$@wire_hilite != ""} {$@wire_hilite select 0} #set @select_by "" } --- 1670,1674 ---- foreach o $@selection {$o selected?= 0} set @selection {} ! if {$@selection_wire != ""} {$@selection_wire select 0} #set @select_by "" } *************** *** 1714,1719 **** } wire { ! if {$@wire_hilite != ""} {$@wire_hilite select 0} ! set @wire_hilite $id $id select 1 } --- 1717,1723 ---- } wire { ! if {$@selection_wire != ""} {$@selection_wire select 0} ! #set @wire_hilite $id ! set @selection_wire $id $id select 1 } *************** *** 1871,1879 **** #puts "focus = $@focus" if {$key == 8} { ! if {[llength $@selection] > 0} {$self delete_selection} if {[llength $@selection_wire] > 0} { ! $c delete $@selection_wire ! foreach wire $@selection_wire {$c delete $wire} ! set @selection_wire {} } } --- 1875,1890 ---- #puts "focus = $@focus" if {$key == 8} { ! if {[llength $@selection] > 0} { ! puts "delete objects!!!" ! $self delete_selection ! } if {[llength $@selection_wire] > 0} { ! $@selection_wire erase $self ! #puts "delete wires!!!" ! #set wire $@selection_wire; puts "wire: ${wire}WIRE" ! #puts "......from:$@obj1 outlet:$@port1 to:$@obj2 inlet:$@port2" ! #$c delete ${wire}WIRE ! #foreach wire $@selection_wire {$c delete $wire} ! #set @selection_wire {} } } *************** *** 2038,2041 **** --- 2049,2062 ---- }
+ #def* wire erase {canvas} { + # puts "......from:$@obj1 outlet:$@port1 to:$@obj2 inlet:$@port2" + # super + # puts "wires: $_($canvas:wires)" + # + # #$c delete ${wire}WIRE + # #foreach wire $@selection_wire {$c delete $wire} + # #set @selection_wire {} + #} + def wire update {source outlet target inlet kind} { set @source $source