[PD-cvs] pd/src desire.tk,1.1.2.478,1.1.2.479

chunlee chunlee at users.sourceforge.net
Fri Sep 22 16:08:15 CEST 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12600

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
small fixes to my previous commit


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.478
retrieving revision 1.1.2.479
diff -C2 -d -r1.1.2.478 -r1.1.2.479
*** desire.tk	22 Sep 2006 01:24:14 -0000	1.1.2.478
--- desire.tk	22 Sep 2006 14:08:12 -0000	1.1.2.479
***************
*** 1642,1645 ****
--- 1642,1646 ----
  def Canvas draw {} {
  	if {$@subpatch && $@canvas != ""} {super} ;# is for the [pd] box if applicable
+ 	if {[info exists @gop]} {if {$@gop} {super}}
  	if {!$@mapped} {return}
  	if {$@editmode} {set bg [$self look bgedit]} else {set bg [$self look bgrun]}
***************
*** 1779,1783 ****
  def TextBox update_size {} {
  	global font
! 	if {$@gop} {set @xs $@pixwidth; set @ys $@pixheight; return}
  	set l {};set nl 1
  	foreach char [split $@text ""] {lappend l [scan $char %c]}
--- 1780,1784 ----
  def TextBox update_size {} {
  	global font
! 	if {[info exists @gop]} {if {$@gop} {set @xs $@pixwidth; set @ys $@pixheight; return}}
  	set l {};set nl 1
  	foreach char [split $@text ""] {lappend l [scan $char %c]}
***************
*** 3393,3398 ****
--- 3394,3404 ----
  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
  }
***************
*** 4517,4532 ****
  	set yto [lindex $mess 1]
  	set width [expr $c_width / $@length]
! 	#puts "w: $width | h: $height | length: $length | xfrom: $xfrom | xto: $xto | yfrom: $yfrom | yto: $yto"
  	puts "data: $@data"
  	set i 0
  	foreach val $@data {
! 		set y [expr $c_height - (($val/$yto) * $c_height)]
  		set x1 [expr $width * $i]
  		set x2 [expr $x1 + $width]
  		set line [list $x1 $y $x2 $y]
  		set tag ${self}${i}
! 		$self item $tag line $line -fill [$@canvas look compfg] -width 2
  		incr i
  	}
  #	$self item TEXT text [list $x1 $y1] \
  #	    -font [$self look fontstring] -text "an array named '$@name' should appear in this patch" \
--- 4523,4540 ----
  	set yto [lindex $mess 1]
  	set width [expr $c_width / $@length]
! 	puts "w: $c_width | h: $c_height | length: $@length | xfrom: $xfrom | xto: $xto | yfrom: $yfrom | yto: $yto"
  	puts "data: $@data"
  	set i 0
+ #		$self item RECT polygon [list 0 0 $c_width 0 $c_width $c_height 0 $c_height] -outline red -fill white
  	foreach val $@data {
! 		set y [expr $c_height - ((($val+abs($yfrom))/($yto-($yfrom)) * $c_height))]
  		set x1 [expr $width * $i]
  		set x2 [expr $x1 + $width]
  		set line [list $x1 $y $x2 $y]
  		set tag ${self}${i}
! 		$self item elem${i} line $line -fill [$@canvas look compfg] -width 2 -tags "$self"
  		incr i
  	}
+ 
  #	$self item TEXT text [list $x1 $y1] \
  #	    -font [$self look fontstring] -text "an array named '$@name' should appear in this patch" \
***************
*** 4534,4537 ****
--- 4542,4547 ----
  }
  
+ def Array click {x y f target} {set @action "move"; puts "action:: $@action";puts "click on array........."}
+ def Array motion {x y f target} {}
  def Array length= {val} {set @length $val}
  def Array name= {val} {set @name $val}





More information about the Pd-cvs mailing list