Behavior.st
branchjv
changeset 18093 2b786a9af1d0
parent 18086 33a050555eb1
parent 15745 752db6d03dd5
child 18098 2bbfe6952a44
--- a/Behavior.st	Wed Aug 28 10:49:29 2013 +0100
+++ b/Behavior.st	Wed Sep 04 09:43:51 2013 +0100
@@ -3882,6 +3882,20 @@
     "Created: / 24-07-2007 / 06:12:27 / cg"
 !
 
+anySubInstance
+    "return any of my or derived instances; raise an error, if there is none"
+
+    "Read the documentation on why there seem to be no
+     instances of SmallInteger and UndefinedObject"
+
+    self allSubInstancesDo:[:anObject | ^ anObject].
+    self errorNotFound
+
+    "
+     View anySubInstance
+    "
+!
+
 derivedInstanceCount
     "return the number of instances of myself and of subclasses"
 
@@ -5011,10 +5025,10 @@
 !Behavior class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.346 2013-08-22 08:42:13 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.348 2013-09-03 21:49:56 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.346 2013-08-22 08:42:13 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.348 2013-09-03 21:49:56 cg Exp $'
 ! !