[PD-cvs] pd/src poe.tcl,1.1.2.2.2.9,1.1.2.2.2.10
Mathieu Bouchard
matju at users.sourceforge.net
Tue Jan 23 18:23:42 CET 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14813
Modified Files:
Tag: desiredata
poe.tcl
Log Message:
added: def Class methods
Index: poe.tcl
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/poe.tcl,v
retrieving revision 1.1.2.2.2.9
retrieving revision 1.1.2.2.2.10
diff -C2 -d -r1.1.2.2.2.9 -r1.1.2.2.2.10
*** poe.tcl 19 Dec 2006 04:06:40 -0000 1.1.2.2.2.9
--- poe.tcl 23 Jan 2007 17:23:39 -0000 1.1.2.2.2.10
***************
*** 187,191 ****
def Class <= {class} {return [expr [lsearch [$self ancestors] $class]>=0]}
! # those are static methods, and objective.tcl doesn't distinguish them yet.
def Class new { args} {eval [concat [list ${self}_new ] $args]}
def Class new_as {id args} {eval [concat [list ${self}_new_as $id] $args]}
--- 187,203 ----
def Class <= {class} {return [expr [lsearch [$self ancestors] $class]>=0]}
! # note: [luniq] is actually defined in desire.tk
! def Class methods {} {
! set methods {}
! set anc [$self ancestors]
! foreach class $anc {
! foreach name [info procs ${class}_*] {
! lappend methods [join [lrange [split $name _] 1 end] _]
! }
! }
! return [luniq [lsort $methods]]
! }
!
! # those are static methods, and poe.tcl doesn't distinguish them yet.
def Class new { args} {eval [concat [list ${self}_new ] $args]}
def Class new_as {id args} {eval [concat [list ${self}_new_as $id] $args]}
More information about the Pd-cvs
mailing list