# HG changeset patch # User Stefan Vogel # Date 1255427718 -7200 # Node ID 93c323c8a166b644ca0891555b7fb39bd287747b # Parent 1ebf269379c763efe56d73a7bfcfbb4f219a1ed3 changed: #autoload #initialize Autoload autoload - so not reload Autoload diff -r 1ebf269379c7 -r 93c323c8a166 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!