Autoload.st
changeset 2531 1e22ac3610a4
parent 2375 7eb1b35edc33
child 2539 ed836330dbff
--- a/Autoload.st	Mon Apr 07 13:57:04 1997 +0200
+++ b/Autoload.st	Mon Apr 07 18:21:27 1997 +0200
@@ -475,6 +475,33 @@
     ^ nil
 
     "Created: 8.2.1997 / 19:42:47 / cg"
+!
+
+subclass:nameSymbol instanceVariableNames:instVarNames classVariableNames:cVarNames poolDictionaries:poolDicts privateIn:owningClass
+    "catch subclass creation - this forces missing superclasses to be 
+     loaded first"
+
+    |newClass sel args|
+
+    "take care: subclassing Autoload must still be possible"
+    (self == Autoload) ifTrue:[
+        ^ super 
+            subclass:nameSymbol 
+            instanceVariableNames:instVarNames 
+            classVariableNames:cVarNames 
+            poolDictionaries:poolDicts 
+            privateIn:owningClass
+    ].
+
+    newClass := self autoload.
+    sel := thisContext selector.
+    args := thisContext args.
+    newClass notNil ifTrue:[
+        ^ newClass perform:sel withArguments:args
+    ].
+    ^ nil
+
+    "Created: 8.2.1997 / 19:42:47 / cg"
 ! !
 
 !Autoload class methodsFor:'queries'!
@@ -518,6 +545,6 @@
 !Autoload class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.66 1997-02-10 12:20:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.67 1997-04-07 16:21:27 ca Exp $'
 ! !
 Autoload initialize!