[PD-cvs] pd/src desire.tk,1.1.2.86,1.1.2.87

Mathieu Bouchard matju at users.sourceforge.net
Sat Oct 29 20:00:52 CEST 2005


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

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.86
retrieving revision 1.1.2.87
diff -C2 -d -r1.1.2.86 -r1.1.2.87
*** desire.tk	29 Oct 2005 11:40:32 -0000	1.1.2.86
--- desire.tk	29 Oct 2005 18:00:50 -0000	1.1.2.87
***************
*** 45,67 ****
  class_new observable {}
  
! def observable init {observer} {
  	set @subscribers {}
  }
  
! def observable subscribe {observer} {
  	set i [lsearch $@subscribers $observer]
  	if {!$i} {lappend @subscribers $observer}
  }
  
! def observable unsubscribe {observer} {
  	set i [lsearch $@subscribers $observer]
  	if {$i} {set @subscribers [lreplace $@subscribers $i $i]}
  }
  
! def observable changed {args} {
  	foreach x $@subscribers {eval [concat [list $x notice $self] $args]}
  }
  
! def observable child_changed {origin args} {
  	foreach x $@subscribers {eval [concat [list $x notice $origin] $args]}
  }
--- 45,67 ----
  class_new observable {}
  
! def* observable init {} {
  	set @subscribers {}
  }
  
! def* observable subscribe {observer} {
  	set i [lsearch $@subscribers $observer]
  	if {!$i} {lappend @subscribers $observer}
  }
  
! def* observable unsubscribe {observer} {
  	set i [lsearch $@subscribers $observer]
  	if {$i} {set @subscribers [lreplace $@subscribers $i $i]}
  }
  
! def* observable changed {args} {
  	foreach x $@subscribers {eval [concat [list $x notice $self] $args]}
  }
  
! def* observable child_changed {origin args} {
  	foreach x $@subscribers {eval [concat [list $x notice $origin] $args]}
  }
***************
*** 142,145 ****
--- 142,146 ----
  set cmdline(icons) icons
  set cmdline(gdb) 1
+ set cmdline(gdbconsole) 1
  set cmdline(valgrind) 0
  set files_to_open {}
***************
*** 150,156 ****
    switch -regexp -- $o {
      ^-console\$ {incr i; set cmdline(console) [lindex $argv $i]}
!     ^-gdb\$ {set cmdline(gdb) 1}
      ^-nogdb\$ {set cmdline(gdb) 0}
!     ^-valgrind\$ {set cmdline(valgrind) 1}
      ^-novalgrind\$ {set cmdline(valgrind) 0}
      ^- {puts "ERROR: command line argument: unknown $o"}
--- 151,159 ----
    switch -regexp -- $o {
      ^-console\$ {incr i; set cmdline(console) [lindex $argv $i]}
!       ^-gdb\$ {set cmdline(gdb) 1}
      ^-nogdb\$ {set cmdline(gdb) 0}
!       ^-gdbconsole\$ {set cmdline(gdbconsole) 1}
!     ^-nogdbconsole\$ {set cmdline(gdbconsole) 0}
!       ^-valgrind\$ {set cmdline(valgrind) 1}
      ^-novalgrind\$ {set cmdline(valgrind) 0}
      ^- {puts "ERROR: command line argument: unknown $o"}
***************
*** 326,335 ****
  } {
      if {$cmdline(gdb)} {
! 	set gdb [open "| gdb" w+]
! 	fconfigure $gdb -blocking 0 -buffering none
! 	puts $gdb "file pd"
! 	puts $gdb "run -guiport 13666"
! 	flush $gdb
! 	after 0 poll_gdb
      } {
  	exec pd -guiport 13666 &
--- 329,342 ----
  } {
      if {$cmdline(gdb)} {
! 	if {$cmdline(console) && $cmdline(gdbconsole)} {
! 	    set gdb [open "| gdb 2&>1" w+]
! 	    fconfigure $gdb -blocking 0 -buffering none
! 	    puts $gdb "file pd"
! 	    puts $gdb "run -guiport 13666"
! 	    flush $gdb
! 	    after 0 poll_gdb
! 	} {
! 	    exec gdb --tui --args pd -guiport 13666 &
! 	}
      } {
  	exec pd -guiport 13666 &
***************
*** 654,659 ****
  }
  
! class_new canvas
  def* canvas init {width height geometry editable} {
      global pd_opendir pd_tearoff OS cmdline canvasmenu focus
      set name .x$self
--- 661,667 ----
  }
  
! class_new canvas {view}
  def* canvas init {width height geometry editable} {
+     super
      global pd_opendir pd_tearoff OS cmdline canvasmenu focus
      set name .x$self
***************
*** 1055,1058 ****
--- 1063,1067 ----
  class_new objectbox {textbox}
  def objectbox init {args} {
+ 	super
  	global font look
  	set @valid 0
***************
*** 1170,1173 ****
--- 1179,1187 ----
  #def* canvas del {i}     {lset @children $i ""}
  
+ def* canvas children= {children} {
+ 	# think of the children!!!
+ 	set @children $children
+ }
+ 
  def* canvas add {obj} {
  	set i [lsearch $@children $obj]
***************
*** 1822,1853 ****
  #set fields(msg)
  
! #             @class    ?           @_class
! set classinfo(obj)     {Object      objectbox}
! set classinfo(tgl)     {Toggle      toggle}
! set classinfo(bng)     {Bang        bang}
! set classinfo(nbx)     {Numberbox   numbox}
! set classinfo(hsl)     {Slider      slider}
! set classinfo(hradio)  {Radiobutton radio}
! set classinfo(vu)      {Vumeter     vu}
! set classinfo(cnv)     {Canvas      cnv}
! set classinfo(dropper) {Dropper     dropper}
  set classinfo(vsl)     $classinfo(hsl)
  set classinfo(vradio)  $classinfo(hradio)
  set classinfo(hdl)     $classinfo(hradio)
  set classinfo(vdl)     $classinfo(hradio)
  
  proc update_object {x d} {
! 	global _ fields
  	set d [string trimright $d "\n"]
  	set d [string trimright $d ";"]
  	set i 1
  	set class [lindex $d $i]
! 	switch -- $class {obj {set i 4; set class [lindex $d 4]}}
  	if {![info exists _($x:_class)]} {
  		if {[info exists classinfo($class)]} {
! 			set _($x:_class) $classinfo($class)
  		} {
  			set _($x:_class) objectbox
  		}
  		puts "_($x:_class)=$_($x:_class)"
  		if {[info exists _($x:canvas)]} {
--- 1836,1875 ----
  #set fields(msg)
  
! #             @class   {@_class}
! set classinfo(obj)     {objectbox}
! set classinfo(tgl)     {toggle}
! set classinfo(bng)     {bang}
! set classinfo(nbx)     {numbox}
! set classinfo(hsl)     {slider}
! set classinfo(hradio)  {radio}
! set classinfo(vu)      {vu}
! set classinfo(dropper) {dropper}
  set classinfo(vsl)     $classinfo(hsl)
  set classinfo(vradio)  $classinfo(hradio)
  set classinfo(hdl)     $classinfo(hradio)
  set classinfo(vdl)     $classinfo(hradio)
+ set classinfo(canvas)  {canvas}
+ set classinfo(cnv)     {cnv}
  
  proc update_object {x d} {
! 	global _ fields classinfo
  	set d [string trimright $d "\n"]
  	set d [string trimright $d ";"]
  	set i 1
  	set class [lindex $d $i]
! 	switch -- $class {
! 		canvas {set class canvas}
! 		obj {set i 4; set class [lindex $d 4]}
! 	}
  	if {![info exists _($x:_class)]} {
+ 		post "class=%s" $class
  		if {[info exists classinfo($class)]} {
! 			post BLAH
! 			set _($x:_class) [lindex $classinfo($class) 0]
  		} {
+ 			post BLEH
  			set _($x:_class) objectbox
  		}
+ 		$x init
  		puts "_($x:_class)=$_($x:_class)"
  		if {[info exists _($x:canvas)]} {
***************
*** 1879,1882 ****
--- 1901,1905 ----
  		incr i
  	}
+ 	$x changed
  }
  
***************
*** 2268,2272 ****
  
  class_new bang {view}
! #def bang init {} {}
  
  def bang draw {canvas} {
--- 2291,2295 ----
  
  class_new bang {view}
! #def bang init {} {super}
  
  def bang draw {canvas} {
***************
*** 2588,2592 ****
  	listener_new .tcl "Tcl" {tcl_eval}
  	listener_new .pd  "Pd"   {pd_eval}
! 	if {$cmdline(gdb)} {listener_new .gdb  "Gdb" {gdb_eval}}
  }
  
--- 2611,2615 ----
  	listener_new .tcl "Tcl" {tcl_eval}
  	listener_new .pd  "Pd"   {pd_eval}
! 	if {$cmdline(gdb) && $cmdline(gdbconsole)} {listener_new .gdb  "Gdb" {gdb_eval}}
  }
  





More information about the Pd-cvs mailing list