checkin from browser
authorClaus Gittinger <cg@exept.de>
Tue, 24 Oct 2000 20:23:38 +0200
changeset 1418 7466259d8bb5
parent 1417 28d6026fe30c
child 1419 f808d17ff6f5
checkin from browser
SnapShotImage.st
--- a/SnapShotImage.st	Tue Oct 24 13:17:22 2000 +0200
+++ b/SnapShotImage.st	Tue Oct 24 20:23:38 2000 +0200
@@ -1,5 +1,3 @@
-'From Smalltalk/X, Version:4.1.1 on 24-Okt-2000 at 12:50:49'                    !
-
 "{ Package: 'cg:private' }"
 
 Object subclass:#SnapShotImage
@@ -34,8 +32,8 @@
 
 for:aFilename
     memory := SnapShotImageMemory for:aFilename.
-    memory readHeader
-! !
+    memory image:self.
+    memory readHeader! !
 
 !SnapShotImage methodsFor:'smalltalk protocol'!
 
@@ -55,6 +53,29 @@
     ].
 !
 
+allClassesInCategory:aCategory
+    |coll|
+
+    coll := OrderedCollection new.
+    self allClassesInCategory:aCategory do:[:aClass |
+        coll add:aClass
+    ].
+    ^ coll!
+
+allClassesInCategory:aCategory do:aBlock
+    "evaluate the argument, aBlock for all classes in the aCategory;
+     The order of the classes is not defined."
+
+    aCategory notNil ifTrue:[
+        self allClassesDo:[:aClass |
+            aClass isMeta ifFalse:[
+                (aClass category = aCategory) ifTrue:[
+                    aBlock value:aClass
+                ]
+            ]
+        ]
+    ]!
+
 at:aKey
     globals isNil ifTrue:[
         self fetchGlobals
@@ -62,6 +83,12 @@
     ^ globals at:aKey
 !
 
+at:aKey ifAbsent:exceptionValue
+    globals isNil ifTrue:[
+        self fetchGlobals
+    ].
+    ^ globals at:aKey ifAbsent:exceptionValue!
+
 keysAndValuesDo:aTwoArgBlock
     globals isNil ifTrue:[
         self fetchGlobals