changed:
authorStefan Vogel <sv@exept.de>
Tue, 13 Oct 2009 11:55:18 +0200
changeset 12252 93c323c8a166
parent 12251 1ebf269379c7
child 12253 c933c6fcdeef
changed: #autoload #initialize Autoload autoload - so not reload Autoload
Autoload.st
--- a/Autoload.st	Tue Oct 13 10:47:33 2009 +0200
+++ b/Autoload.st	Tue Oct 13 11:55:18 2009 +0200
@@ -86,14 +86,21 @@
 !Autoload class methodsFor:'initialization'!
 
 initialize
-    "initialize the failure-signal"
+    "initialize either the Autoload class
+     or load a autoloaded class and initialize it."
 
+    self ~~ Autoload ifTrue:[
+        "subclass: catch initialize - load the class and resend #initialize to the real one"
+        ^ self doesNotUnderstand:(Message selector:#initialize)
+    ].
+
+    "initialize myself"
     AutoloadFailedSignal isNil ifTrue:[
         LazyLoading := false.
 
-        AutoloadFailedSignal := Error newSignalMayProceed:true.
-        AutoloadFailedSignal nameClass:self message:#autoloadFailedSignal.
-        AutoloadFailedSignal notifierString:'autoload failed'.
+        AutoloadFailedSignal := ProceedableError newSignal
+                                    nameClass:self message:#autoloadFailedSignal;
+                                    notifierString:'autoload failed'.
 
         self class changeClassTo:AutoloadMetaclass.
         self setSuperclass:nil.
@@ -106,9 +113,6 @@
         InProgressClasses := IdentitySet new.
     ].
 
-    self ~~ Autoload ifTrue:[
-        ^ self doesNotUnderstand:(Message selector:#initialize)
-    ].
 
     "Modified: / 20.5.1997 / 19:06:25 / cg"
     "Modified: / 3.8.1999 / 14:23:30 / stefan"
@@ -284,6 +288,11 @@
     |myName myNameSpace newClass project prevMode packageID
      packageDefinitionClass|
 
+    self == Autoload ifTrue:[
+        "already loaded"
+        ^ self.
+    ].
+
     myName := self name asSymbol.
     myNameSpace := self nameSpace.
 
@@ -928,11 +937,11 @@
 !Autoload class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.152 2009-10-01 09:28:49 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.153 2009-10-13 09:55:18 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.152 2009-10-01 09:28:49 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.153 2009-10-13 09:55:18 stefan Exp $'
 ! !
 
 Autoload initialize!