when autoloading, allow for the stx-source subtree
authorClaus Gittinger <cg@exept.de>
Fri, 05 Mar 1999 12:58:38 +0100
changeset 4025 d9b9a5e77f1a
parent 4024 3a223c79e41c
child 4026 96712578b0da
when autoloading, allow for the stx-source subtree to be found directly under source (instead of source/stx). This is temporary, to allow for autoload to work in old source trees (must change makefiles & install scripts first)
Autoload.st
--- a/Autoload.st	Thu Mar 04 13:06:29 1999 +0100
+++ b/Autoload.st	Fri Mar 05 12:58:38 1999 +0100
@@ -189,7 +189,7 @@
         ].
     ].
     nm isNil ifTrue:[
-	package := self package.
+        package := self package.
         package notNil ifTrue:[
             nm := Smalltalk getSourceFileName:((package copyReplaceAll:$: with:$/) , '/' , fileName , '.st').
         ].
@@ -221,8 +221,8 @@
     ].
     aStream cr; nextPutAll:'"'.
 
-    "Modified: 30.12.1996 / 17:25:15 / cg"
-    "Created: 5.1.1997 / 14:31:33 / cg"
+    "Created: / 5.1.1997 / 14:31:33 / cg"
+    "Modified: / 5.3.1999 / 12:56:57 / cg"
 ! !
 
 !Autoload class methodsFor:'lazy compilation'!
@@ -290,12 +290,26 @@
                     package := 'stx/' , package
                 ]
             ].
-            Smalltalk 
+
+            (Smalltalk 
                 fileInClass:myName
                 package:package
                 initialize:false 
                 lazy:LazyLoading
-                silent:nil.
+                silent:nil) isNil ifTrue:[
+                "/ temporary: try without stx/package prefix
+                "/ this will vanishas soon as source-directory
+                "/ is always guaranteed to contain an stx-subtree
+                (package startsWith:'stx/') ifTrue:[
+                    package := package copyFrom:5.
+                    Smalltalk 
+                        fileInClass:myName
+                        package:package
+                        initialize:false 
+                        lazy:LazyLoading
+                        silent:nil.
+                ]
+            ]
         ].
         ClassCategoryReader sourceMode:prevMode.
         project notNil ifTrue:[
@@ -375,7 +389,7 @@
     newClass postAutoload.
     ^ newClass
 
-    "Modified: / 18.7.1998 / 22:52:41 / cg"
+    "Modified: / 5.3.1999 / 12:59:13 / cg"
 ! !
 
 !Autoload class methodsFor:'message catching'!
@@ -604,6 +618,6 @@
 !Autoload class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.85 1999-02-28 17:15:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.86 1999-03-05 11:58:38 cg Exp $'
 ! !
 Autoload initialize!