Autoload.st
changeset 739 63566c9b691a
parent 729 67a60a088d56
child 789 155eca125ef0
--- a/Autoload.st	Mon Dec 11 18:36:01 1995 +0100
+++ b/Autoload.st	Tue Dec 12 13:55:31 1995 +0100
@@ -122,7 +122,7 @@
 
     myName := self name.
     aStream nextPutAll:'"' ; nextPutAll:'Notice from Autoload:'; cr; cr;
-            spaces:4; nextPutAll:myName , ' is not yet loaded.'; cr; cr.
+	    spaces:4; nextPutAll:myName , ' is not yet loaded.'; cr; cr.
     aStream nextPutAll:'to load, execute: '.
     aStream cr; cr; spaces:4; nextPutAll:myName  , ' autoload'; cr.
 
@@ -134,45 +134,45 @@
     "
     fileName := Smalltalk fileNameForClass:myName.
     (ObjectFileLoader notNil and:[Smalltalk loadBinaries]) ifTrue:[
-        (nm := Smalltalk libraryFileNameOfClass:myName) notNil ifTrue:[
-            nm := nm , ' (a classLibrary, possibly including more classes)'
-        ] ifFalse:[
-            nm := Smalltalk getBinaryFileName:(fileName , '.so').
-            nm isNil ifTrue:[
-                nm := Smalltalk getBinaryFileName:(fileName , '.o')
-            ].
-            nm notNil ifTrue:[
-                nm := nm , ' (a classBinary)'
-            ]
-        ].
+	(nm := Smalltalk libraryFileNameOfClass:myName) notNil ifTrue:[
+	    nm := nm , ' (a classLibrary, possibly including more classes)'
+	] ifFalse:[
+	    nm := Smalltalk getBinaryFileName:(fileName , '.so').
+	    nm isNil ifTrue:[
+		nm := Smalltalk getBinaryFileName:(fileName , '.o')
+	    ].
+	    nm notNil ifTrue:[
+		nm := nm , ' (a classBinary)'
+	    ]
+	].
     ].
     nm isNil ifTrue:[
-        nm := Smalltalk getFileInFileName:(fileName , '.st').
-        nm isNil ifTrue:[
-            nm := Smalltalk getSourceFileName:(fileName , '.st').
-        ].
+	nm := Smalltalk getFileInFileName:(fileName , '.st').
+	nm isNil ifTrue:[
+	    nm := Smalltalk getSourceFileName:(fileName , '.st').
+	].
     ].
     nm notNil ifTrue:[
-        aStream cr; nextPutAll:'When accessed, ' , myName , ' will automatically be loaded'; cr.
-        aStream nextPutAll:'from: '; cr; spaces:4; nextPutAll:nm.
-        nm asFilename isSymbolicLink ifTrue:[
-            aStream cr; cr.
-            aStream nextPutAll:'which is a link to: '; cr; spaces:4; 
-                    nextPutAll:(nm asFilename linkInfo at:#path).
-        ]
+	aStream cr; nextPutAll:'When accessed, ' , myName , ' will automatically be loaded'; cr.
+	aStream nextPutAll:'from: '; cr; spaces:4; nextPutAll:nm.
+	nm asFilename isSymbolicLink ifTrue:[
+	    aStream cr; cr.
+	    aStream nextPutAll:'which is a link to: '; cr; spaces:4; 
+		    nextPutAll:(nm asFilename linkInfo at:#path).
+	]
     ] ifFalse:[
-        aStream cr; nextPutAll:'There is currently no file to load ' , myName , ' from.'; cr; cr.
+	aStream cr; nextPutAll:'There is currently no file to load ' , myName , ' from.'; cr; cr.
 
-        (mgr := Smalltalk at:#SourceCodeManager) notNil ifTrue:[
-            classFileName := Smalltalk fileNameForClass:myName.
-            packageDir := Smalltalk sourceDirectoryNameOfClass:myName.
-        ].
-        (classFileName notNil and:[packageDir notNil]) ifTrue:[
-            aStream nextPutAll:'When accessed, I''ll ask the sourceCodeManager to load the code 
+	(mgr := Smalltalk at:#SourceCodeManager) notNil ifTrue:[
+	    classFileName := Smalltalk fileNameForClass:myName.
+	    packageDir := Smalltalk sourceDirectoryNameOfClass:myName.
+	].
+	(classFileName notNil and:[packageDir notNil]) ifTrue:[
+	    aStream nextPutAll:'When accessed, I''ll ask the sourceCodeManager to load the code 
 from "' , classFileName , '.st" in the "' , packageDir , '" package.'.
-        ] ifFalse:[
-            aStream nextPutAll:'When accessed, an error will be reported.'.
-        ]
+	] ifFalse:[
+	    aStream nextPutAll:'When accessed, an error will be reported.'.
+	]
     ].
     aStream cr; nextPutAll:'"'.
 
@@ -252,6 +252,7 @@
 
     "wow - it worked. now the big trick ..."
 
+    newClass class setSoleInstance:self.   "/ will be undone by become ...
     self become:newClass.
     LoadedClasses rehash.
     self initialize.            "/ thats the new class now
@@ -361,6 +362,6 @@
 !Autoload class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.35 1995-12-09 23:28:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.36 1995-12-12 12:55:20 cg Exp $'
 ! !
 Autoload initialize!