[PD-cvs] pd/src desire.tk,1.1.2.382,1.1.2.383

Mathieu Bouchard matju at users.sourceforge.net
Sun Aug 20 08:05:22 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
.


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.382
retrieving revision 1.1.2.383
diff -C2 -d -r1.1.2.382 -r1.1.2.383
*** desire.tk	20 Aug 2006 05:13:03 -0000	1.1.2.382
--- desire.tk	20 Aug 2006 06:05:19 -0000	1.1.2.383
***************
*** 177,180 ****
--- 177,188 ----
  }
  
+ proc error_dump {} {
+ 	global errorCode errorInfo
+ 	regsub -all "    invoked from within\n" $errorInfo "" errorInfo
+ 	regsub -all "\n    \\(" $errorInfo " (" errorInfo
+ 	#regsub -all {\n[^\n]*procedure \"(::unknown|super)\"[^\n]*\n} $errorInfo "\n" errorInfo
+ 	puts "[VTred]Exception:[VTgrey] errorCode=$errorCode; errorInfo=$errorInfo"
+ }
+ 
  def Manager call {} {
  	global poolset
***************
*** 183,189 ****
  		#post %s "Manager: $o: $poolset($o)"
  		unset poolset($o)
! 		$o draw
  	}
! 	set @q [list]
  	after 50 "$self call"
  }
--- 191,198 ----
  		#post %s "Manager: $o: $poolset($o)"
  		unset poolset($o)
! 		# $o draw
! 		if {[catch {$o draw}]} {puts [error_dump]}
  	}
! 	set @q {}
  	after 50 "$self call"
  }
***************
*** 681,685 ****
  		}
  		if {[fblocked $sock]} {break}
! 		#if {[string first pdtk_post $cmd]!=0} {puts "-> $cmd"}
  		append sock_lobby "\n$cmd"
  		if {[catch {eval $sock_lobby}]} {
--- 690,694 ----
  		}
  		if {[fblocked $sock]} {break}
! 		if {[string first pdtk_post $cmd]!=0} {puts "-> $cmd"}
  		append sock_lobby "\n$cmd"
  		if {[catch {eval $sock_lobby}]} {
***************
*** 1601,1605 ****
  	set @x1 [lindex $mess 2]
  	set @y1 [lindex $mess 3]
! 	set @text [lrange $mess 5 end]
  }
  
--- 1610,1614 ----
  	set @x1 [lindex $mess 2]
  	set @y1 [lindex $mess 3]
! 	set @text [lrange $mess 4 end]
  }
  
***************
*** 2411,2415 ****
  }
  
! def* Canvas unclick {x y f target} {
      set c .$self.c
      mset {type id detail} $target
--- 2420,2424 ----
  }
  
! def Canvas unclick {x y f target} {
      set c .$self.c
      mset {type id detail} $target
***************
*** 2792,2805 ****
  
  def Box init {{mess {}}} {
-     global classinfo fields
      super
      set @wires {}
!     set pdclass [lindex $mess 1]
!     if {[llength $mess]} {
! 	if {$pdclass == "obj"} {set pdclass [lindex $mess 4]}
! 	if {[info exists fields($pdclass)]} {
! 	    set i 0
! 	    foreach f $fields($pdclass) {set _($self:$f) [lindex $mess $i]; incr i}
!         }
      }
  }
--- 2801,2818 ----
  
  def Box init {{mess {}}} {
      super
      set @wires {}
!     $self reinit $mess
! }
! 
! def Box reinit {mess} {
!     global classinfo fields
!     if {![llength $mess]} {return} ;# what?
!     if {[lindex $mess 1] == "obj"} {set i 4} else {set i 1}
!     set @pdclass [lindex $mess $i]
!     # incr i
!     set i 0
!     if {[info exists fields($@pdclass)]} {
! 	foreach f $fields($@pdclass) {set _($self:$f) [lindex $mess $i]; incr i}
      }
  }
***************
*** 2925,2934 ****
  	set port1 $@port1
  	set port2 $@port2
- 	mset {x1 y1 x2 y2} [.$@canvas.c bbox ${obj1}o${port1}]
- 	mset {x3 y3 x4 y4} [.$@canvas.c bbox ${obj2}i${port2}]
- 	#list [expr ($x2+$x1)/2] [expr ($y2+$y1)/2] [expr ($x4+$x3)/2] [expr ($y4+$y3)/2]
  	set scale [$@canvas scale]
! 	list [expr (($x1+$x2)/2)/$scale] [expr (($y1+$y2)/2)/$scale] \
! 	     [expr (($x3+$x4)/2)/$scale] [expr (($y3+$y4)/2)/$scale]
  }
  
--- 2938,2946 ----
  	set port1 $@port1
  	set port2 $@port2
  	set scale [$@canvas scale]
! 	mset {x1 y1 x2 y2} [lmap / [.$@canvas.c bbox ${obj1}o${port1}] $scale]
! 	mset {x3 y3 x4 y4} [lmap / [.$@canvas.c bbox ${obj2}i${port2}] $scale]
! 	list [expr ($x1+$x2)/2)] [expr ($y1+$y2)/2)] \
! 	     [expr ($x3+$x4)/2)] [expr ($y3+$y4)/2)]
  }
  
***************
*** 3025,3032 ****
  set fields(hdl)    $fields(hradio)
  set fields(vdl)    $fields(hradio)
! set fields(coords) {foo bar xfrom yfrom xto yto w h gop x1 y1}
  set fields(floatatom)  {foo bar x1 y1 w min max pos lab snd rcv}
  set fields(symbolatom) {foo bar x1 y1 w min max pos lab snd rcv}
! set fields(array) {name n elemtype flags}
  
  proc classinfo {pdclass _class} {
--- 3037,3044 ----
  set fields(hdl)    $fields(hradio)
  set fields(vdl)    $fields(hradio)
! set fields(coords)     {foo bar xfrom yfrom xto yto w h gop x1 y1} ;# goes with #N canvas
  set fields(floatatom)  {foo bar x1 y1 w min max pos lab snd rcv}
  set fields(symbolatom) {foo bar x1 y1 w min max pos lab snd rcv}
! set fields(array)      {name n elemtype flags}
  
  proc classinfo {pdclass _class} {
***************
*** 3968,3977 ****
  class_new Toggle {BlueBox}
  
- def Toggle init {mess} {
- 	super $mess
- 	set @on 0
- 	set @w 15
- }
- 
  def Toggle bbox {} {
  	mset {x1 y1} [$self xy]
--- 3980,3983 ----





More information about the Pd-cvs mailing list