[PD-cvs] pd/src desire.tk,1.1.2.149,1.1.2.150
chunlee
chunlee at users.sourceforge.net
Tue Apr 11 01:39:54 CEST 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16164
Modified Files:
Tag: devel_0_39
desire.tk
Log Message:
seperated the wire delete code a bit, so that there are less $_($) stuff
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.149
retrieving revision 1.1.2.150
diff -C2 -d -r1.1.2.149 -r1.1.2.150
*** desire.tk 10 Apr 2006 22:23:06 -0000 1.1.2.149
--- desire.tk 10 Apr 2006 23:39:49 -0000 1.1.2.150
***************
*** 1481,1500 ****
}
! ## removes the wire from the $_($obj1:wires)
! set obj1 $_($wire:obj1)
! set find [lsearch $_($obj1:wires) $wire]
! if { $find != -1} {
! set _($obj1:wires) [lreplace $_($obj1:wires) $find $find]
! }
! ## removes the wire from the $_($obj2:wires)
! set obj2 $_($wire:obj2)
! set find [lsearch $_($obj2:wires) $wire]
! if { $find != -1} {
! set _($obj2:wires) [lreplace $_($obj2:wires) $find $find]
! }
!
! ## i don't know why wires are taged as 00000000WIRE...
! ## not sure why $x erase don't work, look later...
! $c delete ${wire}WIRE
}
--- 1481,1485 ----
}
! $wire delete
}
***************
*** 1976,1997 ****
set @wires_pair [lreplace $@wires_pair [expr $find - 1] [expr $find - 1]]
}
!
! # removes the wire from the $_($obj1:wires)
! set obj1 $_($x:obj1)
! set find [lsearch $_($obj1:wires) $x]
! if { $find != -1} {
! set _($obj1:wires) [lreplace $_($obj1:wires) $find $find]
! }
! # removes the wire from the $_($obj2:wires)
! set obj2 $_($x:obj2)
! set find [lsearch $_($obj2:wires) $x]
! if { $find != -1} {
! set _($obj2:wires) [lreplace $_($obj2:wires) $find $find]
! }
!
! # i don't know why wires are taged as 00000000WIRE...
! # not sure why $x erase don't work, look later...
! $c delete ${x}WIRE
}
}
}
--- 1961,1968 ----
set @wires_pair [lreplace $@wires_pair [expr $find - 1] [expr $find - 1]]
}
! $x delete
}
+
+ set $@selection_wire {}
}
}
***************
*** 2048,2051 ****
--- 2019,2029 ----
}
+ def* box delete_wire {wire} {
+ set find [lsearch $@wires $wire]
+ if { $find != -1} {
+ set @wires [lreplace $@wires $find $find]
+ }
+ }
+
def* box move {dx dy} {
global _
***************
*** 2167,2182 ****
}
! #def wire delete {} {
! # set find [lsearch $_($@obj1:wires) $x]
! # if { $find != -1} {
! # set _($obj1:wires) [lreplace $_($obj1:wires) $find $find]
! # }
! # # removes the wire from the $_($obj2:wires)
! # set obj2 $_($x:obj2)
! # set find [lsearch $_($obj2:wires) $x]
! # if { $find != -1} {
! # set _($obj2:wires) [lreplace $_($obj2:wires) $find $find]
! # }
! #}
#-----------------------------------------------------------------------------------#
--- 2145,2158 ----
}
! def wire delete {} {
! set c .$@canvas.c
! $@obj1 delete_wire $self
! $@obj2 delete_wire $self
! # i don't know why wires are taged as 00000000WIRE...
! # not sure why $self erase don't work, look later...
! #$self erase
! $c delete ${self}WIRE
!
! }
#-----------------------------------------------------------------------------------#
More information about the Pd-cvs
mailing list