--- a/Behavior.st Wed Apr 29 13:23:35 2015 +0200
+++ b/Behavior.st Fri May 01 11:00:32 2015 +0200
@@ -1426,6 +1426,7 @@
^ self nameWithoutPrefix
! !
+
!Behavior methodsFor:'RefactoringBrowser'!
realClass
@@ -4050,6 +4051,23 @@
"
!
+allInstancesForWhich:predicate do:action
+ "perform action on all instances for which predicate returns true"
+
+ "Read the documentation on why there seem to be no
+ instances of SmallInteger and UndefinedObject"
+
+ self allInstancesDo:[:anObject |
+ (predicate value:anObject) ifTrue:[
+ action value:anObject
+ ].
+ ].
+
+ "
+ ScrollBar allInstancesForWhich:[:s | s shown] do:[:s | Transcript showCR:s topView label]
+ "
+!
+
allInstancesWeakly:doWeakly
"return a collection of all my instances.
If weakly is true, a weak collection is returned."
@@ -5265,9 +5283,10 @@
!Behavior class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.373 2015-04-26 11:30:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.374 2015-05-01 09:00:32 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.373 2015-04-26 11:30:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.374 2015-05-01 09:00:32 cg Exp $'
! !
+