[PD-cvs] pd/src objective.tcl,1.1.2.10,1.1.2.11

Mathieu Bouchard matju at users.sourceforge.net
Mon Jun 19 07:51:51 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	objective.tcl 
Log Message:
_vars gives list of instance variables for an object.
(warning: super slow)


Index: objective.tcl
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/objective.tcl,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -C2 -d -r1.1.2.10 -r1.1.2.11
*** objective.tcl	13 Jun 2006 06:24:32 -0000	1.1.2.10
--- objective.tcl	19 Jun 2006 05:51:49 -0000	1.1.2.11
***************
*** 119,122 ****
--- 119,131 ----
  def* Thing _delete {} {}
  
+ def Thing _vars {} {
+ 	set n [string length $self:]
+ 	set ks [list]
+ 	foreach k [array names _] {
+ 		if {0==[string compare -length $n $self: $k]} {lappend ks [string range $k $n end]}
+ 	}
+ 	return $ks
+ }
+ 
  class_new Class
  def Class subclasses {} {return $@subclasses}





More information about the Pd-cvs mailing list