Index: xotcl/generic/predefined.xotcl =================================================================== diff -u -r225b8b992e16760eca2a7fa7bf51533499c7cc84 -r55764ef8921abb0e4f506e0ae6b0caf3f842276d --- xotcl/generic/predefined.xotcl (.../predefined.xotcl) (revision 225b8b992e16760eca2a7fa7bf51533499c7cc84) +++ xotcl/generic/predefined.xotcl (.../predefined.xotcl) (revision 55764ef8921abb0e4f506e0ae6b0caf3f842276d) @@ -1,4 +1,4 @@ -# $Id: predefined.xotcl,v 1.4 2004/07/20 12:57:59 neumann Exp $ +# $Id: predefined.xotcl,v 1.5 2005/01/10 11:57:35 neumann Exp $ # init must exist on Object. per default it is empty. ::xotcl::Object instproc init args {} @@ -94,7 +94,15 @@ if {[::xotcl::my ismixin $cl]} {return 1} ::xotcl::my istype $cl } +::xotcl::Class instproc allinstances {} { + set set [::xotcl::my info instances] + foreach sc [::xotcl::my info subclass] { + eval lappend set [$sc allinstances] + } + return $set +} + # Exit Handler ::xotcl::Object proc unsetExitHandler {} { ::xotcl::Object proc __exitHandler {} { @@ -407,7 +415,7 @@ # # if cutTheArg not 0, it cut from upvar argsList # -xotcl::Object instproc extractConfigureArg {al name {cutTheArg 0}} { +::xotcl::Object instproc extractConfigureArg {al name {cutTheArg 0}} { set value "" upvar $al argList set largs [llength $argList]