--- a/WeakIdSet.st Thu Feb 02 13:13:16 1995 +0100
+++ b/WeakIdSet.st Thu Feb 02 13:23:05 1995 +0100
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Attic/WeakIdSet.st,v 1.4 1994-10-28 01:31:00 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/WeakIdSet.st,v 1.5 1995-02-02 12:23:05 claus Exp $
'!
!WeakIdentitySet class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Attic/WeakIdSet.st,v 1.4 1994-10-28 01:31:00 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/WeakIdSet.st,v 1.5 1995-02-02 12:23:05 claus Exp $
"
!
@@ -87,6 +87,28 @@
^ w
! !
+!WeakIdentitySet methodsFor:'enumerating'!
+
+do:aBlock
+ "perform the block for all members in the collection.
+ This method has been rewritten to be more robust about
+ changed contents while enumerating elements (which might
+ happen during change&update processing, if dependents
+ are added or removed within the update."
+
+ |index "{ Class: SmallInteger }"
+ element|
+
+ index := 1.
+ [index <= keyArray size] whileTrue:[
+ element := keyArray at:index.
+ (element notNil and:[element ~~ DeletedEntry]) ifTrue:[
+ aBlock value:element
+ ].
+ index := index + 1
+ ]
+! !
+
!WeakIdentitySet methodsFor:'element disposal'!
informDispose