[PD-cvs] pd/src objective.tcl,1.1.2.8,1.1.2.9

Mathieu Bouchard matju at users.sourceforge.net
Thu Apr 20 03:46:35 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	objective.tcl 
Log Message:
now supports @$ and $@$ syntaxes, for variable instance variable.


Index: objective.tcl
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/objective.tcl,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -C2 -d -r1.1.2.8 -r1.1.2.9
*** objective.tcl	16 Apr 2006 08:30:45 -0000	1.1.2.8
--- objective.tcl	20 Apr 2006 01:46:32 -0000	1.1.2.9
***************
*** 37,45 ****
  proc def {self selector args body} {
  	global _; if {![info exists _($self:_class)]} {error "unknown class '$self'"}
! 	proc  ${self}_$selector "self $args" "global _; [regsub -all @(\[\\w\\?\]+) $body _(\$self:\\1)]"
  }
  proc def* {self selector args body} {
  	global _; if {![info exists _($self:_class)]} {error "unknown class '$self'"}
! 	proc* ${self}_$selector "self $args" "global _; [regsub -all @(\[\\w\\?\]+) $body _(\$self:\\1)]"
  }
  
--- 37,45 ----
  proc def {self selector args body} {
  	global _; if {![info exists _($self:_class)]} {error "unknown class '$self'"}
! 	proc  ${self}_$selector "self $args" "global _; [regsub -all @(\[\\\$\\w\\?\]+) $body _(\$self:\\1)]"
  }
  proc def* {self selector args body} {
  	global _; if {![info exists _($self:_class)]} {error "unknown class '$self'"}
! 	proc* ${self}_$selector "self $args" "global _; [regsub -all @(\[\\\$\\w\\?\]+) $body _(\$self:\\1)]"
  }
  
***************
*** 112,115 ****
--- 112,116 ----
  #set _(Thing:_super) {}
  def* Thing init {} {}
+ def Thing == {other} {return [expr ![string compare $self $other]]}
  
  # virtual destructor





More information about the Pd-cvs mailing list