Simplify autoloading
authorStefan Vogel <sv@exept.de>
Tue, 02 Jul 2002 14:35:42 +0200
changeset 3637 f9cede7d3bdc
parent 3636 1f3ff3b28fa4
child 3638 f42af19c7484
Simplify autoloading
SimpleView.st
--- a/SimpleView.st	Tue Jun 25 19:28:06 2002 +0200
+++ b/SimpleView.st	Tue Jul 02 14:35:42 2002 +0200
@@ -7303,7 +7303,7 @@
 
     ((myClass := self class) == View
     or:[myClass == SimpleView]) ifTrue:[
-	^ ViewSpec "/ CompositeSpecCollection
+        ^ ViewSpec "/ CompositeSpecCollection
     ].
 
     "/ try: appending 'Spec' to my classes name
@@ -7311,10 +7311,8 @@
     myName := self class name.
     cls := Smalltalk classNamed:(myName , 'Spec').
     cls notNil ifTrue:[
-	cls isLoaded ifFalse:[
-	    cls autoload
-	].
-	(cls notNil and:[cls isSubclassOf:UISpecification]) ifTrue:[^ cls].
+        cls autoload.
+        (cls notNil and:[cls isSubclassOf:UISpecification]) ifTrue:[^ cls].
     ].
 
     (myName endsWith:'View') ifTrue:[
@@ -7325,14 +7323,12 @@
 "/        ].
 "/        (cls notNil and:[cls isSubclassOf:UISpecification]) ifTrue:[^ cls].
 
-	"/ try with 'View' replaced by 'Spec'
-	cls := Smalltalk classNamed:((myName copyWithoutLast:4) , 'View').
-	cls notNil ifTrue:[
-	    cls isLoaded ifFalse:[
-		cls autoload
-	    ].
-	    (cls notNil and:[cls isSubclassOf:UISpecification]) ifTrue:[^ cls].
-	]
+        "/ try with 'View' replaced by 'Spec'
+        cls := Smalltalk classNamed:((myName copyWithoutLast:4) , 'View').
+        cls notNil ifTrue:[
+            cls autoload.
+            (cls notNil and:[cls isSubclassOf:UISpecification]) ifTrue:[^ cls].
+        ]
     ].
 
     "/ fallBack for all others
@@ -9285,6 +9281,6 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.440 2002-05-14 13:40:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.441 2002-07-02 12:35:42 stefan Exp $'
 ! !
 SimpleView initialize!