support proper unregistration, when a classLib fails to load
authorClaus Gittinger <cg@exept.de>
Thu, 16 Sep 1999 20:29:18 +0200
changeset 967 160ab002eed1
parent 966 0da15d671aef
child 968 78770f79938d
support proper unregistration, when a classLib fails to load due to a missing superclass.
ObjectFileHandle.st
--- a/ObjectFileHandle.st	Thu Sep 16 20:28:44 1999 +0200
+++ b/ObjectFileHandle.st	Thu Sep 16 20:29:18 1999 +0200
@@ -81,6 +81,16 @@
     "Modified: 30.1.1997 / 20:54:54 / cg"
 !
 
+makeClassLibHandle
+    "make this a classLibHandle - must be done manually when init failed for proper de-registration
+     later."
+
+    handleType notNil ifTrue:[
+	self error:'should not happen'.
+    ].
+    handleType := #classLibraryObject 
+!
+
 method
     "return the method"
 
@@ -357,10 +367,18 @@
     ^ false
 
     "Modified: 12.7.1996 / 15:42:21 / cg"
+!
+
+isUnknownHandle
+    "return true, if it is not (yet) known, what type of
+     file is represented by the handle. (i.e. when loaded, but not yet
+     registered/initialized)"
+
+    ^ handleType isNil
 ! !
 
 !ObjectFileHandle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileHandle.st,v 1.23 1999-09-14 07:01:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileHandle.st,v 1.24 1999-09-16 18:29:18 cg Exp $'
 ! !