Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv635
Modified Files: Tag: devel_0_39 desire.tk Log Message: some temporary bug fixes
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.90 retrieving revision 1.1.2.91 diff -C2 -d -r1.1.2.90 -r1.1.2.91 *** desire.tk 31 Oct 2005 13:20:08 -0000 1.1.2.90 --- desire.tk 1 Nov 2005 02:08:53 -0000 1.1.2.91 *************** *** 733,736 **** --- 733,738 ---- $self changed $self canvas= $self + #not sure if init should be calling pd, but it fixes the editmode bug for now -chun + pd "$name editmode 0 ;" }
*************** *** 974,978 **** set ins $@ninlets set outs $@noutlets ! global look mset {x1 y1} [$self xy $canvas] set x2 [expr $x1+$xs] --- 976,980 ---- set ins $@ninlets set outs $@noutlets ! global look font mset {x1 y1} [$self xy $canvas] set x2 [expr $x1+$xs] *************** *** 992,995 **** --- 994,998 ---- #super $canvas textbox_draw $self $canvas + textbox_edit $self $canvas catch {$c raise ${self}TEXT $self} } *************** *** 1048,1052 **** set t .x$canvas.c.${self}text $t configure -width [expr [string length $@text]+1] ! } { item $self $canvas TEXT text [l+ {2 2} [list $x1 $y1]] \ -font [format -*-courier-medium--normal--%d-* $font(size)] \ --- 1051,1055 ---- set t .x$canvas.c.${self}text $t configure -width [expr [string length $@text]+1] ! } { item $self $canvas TEXT text [l+ {2 2} [list $x1 $y1]] \ -font [format -*-courier-medium--normal--%d-* $font(size)] \ *************** *** 1103,1106 **** --- 1106,1110 ---- set @class "" set @text $args + # to signal if an object is currently in edit set @edit 0 #if {[info exists _($canvas:selection)]} { *************** *** 1474,1478 **** } set @action move ! } }
--- 1478,1482 ---- } set @action move ! }canvas click }
*************** *** 1500,1528 **** mset {type id} [$self identify_target $x $y $b $f "click"] switch $type { ! object {$self click_on_object $x $y $b $f $id} ! wire {$self click_on_wire $x $y $b $f $id} default { if {$@editmode} { puts "clicked on blank space and in edit mode" # my object edit mode code begins --chun ! if {[llength $@obj_in_edit]} { ! [lindex $@selection 0] unedit $self ! set @obj_in_edit {} ! } ! if {[llength $@selection] > 0} { ! foreach obj $@selection { ! $c itemconfigure ${obj}BASE -outline $look(objectframe3) ! } ! set @selection {} ! } ! if {[llength $@selection_wire] > 0} { ! foreach wire $@selection_wire { ! $c itemconfigure $wire -fill $look(wirefg) ! } ! set @selection_wire {} ! } ! focus $c ! set @action rect ! $c create line $x $y $x $y $x $y $x $y $x $y -tags {selrect1 selrect} -fill black -dash {3 3 3 3} -dashoffset 3 } } --- 1504,1532 ---- mset {type id} [$self identify_target $x $y $b $f "click"] switch $type { ! # object {$self click_on_object $x $y $b $f $id} ! # wire {$self click_on_wire $x $y $b $f $id} default { if {$@editmode} { puts "clicked on blank space and in edit mode" # my object edit mode code begins --chun ! # if {[llength $@obj_in_edit]} { ! # [lindex $@selection 0] unedit $self ! # set @obj_in_edit {} ! # } ! # if {[llength $@selection] > 0} { ! # foreach obj $@selection { ! # $c itemconfigure ${obj}BASE -outline $look(objectframe3) ! # } ! # set @selection {} ! # } ! # if {[llength $@selection_wire] > 0} { ! # foreach wire $@selection_wire { ! # $c itemconfigure $wire -fill $look(wirefg) ! # } ! # set @selection_wire {} ! # } ! # focus $c ! # set @action rect ! # $c create line $x $y $x $y $x $y $x $y $x $y -tags {selrect1 selrect} -fill black -dash {3 3 3 3} -dashoffset 3 } } *************** *** 1899,1902 **** --- 1903,1907 ---- set i 1 set class [lindex $d $i] + puts "class = $class" switch -- $class { canvas {set class canvas} *************** *** 1912,1936 **** set _($x:_class) objectbox } ! $x init puts "_($x:_class)=$_($x:_class)" ! if {[info exists _($x:canvas)]} { # hack ! set canvas $_($x:canvas) ! if {![info exists _($canvas:action)]} { #puts "!!!!!! $canvas not initd !!!!!" ! $canvas init ! } ! if {![info exists _($x:cx)]} { ! set _($x:cx) [lindex $d 2] ! set _($x:cy) [lindex $d 3] ! } ! $x init ! set _($x:text) [lrange $d $i end] ! set _($x:valid) 0 ! $x update_size ! $x draw $canvas ! if {[string length $_($x:text)]==0} {$x edit $canvas} ! set _($_($x:canvas):selection) $x ! } } if {![info exists fields($class)]} {set class obj} --- 1917,1941 ---- set _($x:_class) objectbox } ! $x init puts "_($x:_class)=$_($x:_class)" ! #if {[info exists _($x:canvas)]} { # hack ! # set canvas $_($x:canvas) ! # if {![info exists _($canvas:action)]} { #puts "!!!!!! $canvas not initd !!!!!" ! # $canvas init ! # } ! # if {![info exists _($x:cx)]} { ! # set _($x:cx) [lindex $d 2] ! # set _($x:cy) [lindex $d 3] ! # } ! # $x init ! # set _($x:text) [lrange $d $i end] ! # set _($x:valid) 0 ! # $x update_size ! # $x draw $canvas ! # if {[string length $_($x:text)]==0} {$x edit $canvas} ! # set _($_($x:canvas):selection) $x ! #} } if {![info exists fields($class)]} {set class obj}