#BUGFIX by stefan
class: Autoload class
added: #askFor:
comment/format in: #isLoaded
#askFor: didn't load the class
--- a/Autoload.st Tue Jan 21 15:17:01 2020 +0100
+++ b/Autoload.st Tue Jan 21 15:32:06 2020 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
@@ -15,7 +17,7 @@
nil subclass:#Autoload
instanceVariableNames:''
- classVariableNames:'LazyLoading AutoloadFailedSignal LoadedClasses InProgressClasses'
+ classVariableNames:'AutoloadFailedSignal InProgressClasses LazyLoading LoadedClasses'
poolDictionaries:''
category:'Kernel-Classes'
!
@@ -544,6 +546,22 @@
!Autoload class methodsFor:'message catching'!
+askFor:aSelector
+ "catch askFor: - load the class and resend #askFor: to the real one"
+
+ self == Autoload ifTrue:[
+ ^ super askFor:aSelector
+ ].
+ ^ self doesNotUnderstand:(Message selector:#askFor: argument:aSelector)
+
+ "
+ Wrapper unload.
+ Wrapper askFor:#isSecret
+ "
+
+ "Created: / 21-01-2020 / 15:24:04 / Stefan Vogel"
+!
+
at:arg
"catch at: - redefined because it is understood"
@@ -800,10 +818,11 @@
Autoload itself is loaded, subclasses are not.
This allows testing whether a class has already been loaded."
- ^ (self == Autoload)
+ ^ self == Autoload
"Modified: / 16-02-1998 / 11:57:35 / stefan"
"Modified (comment): / 27-07-2013 / 15:35:01 / cg"
+ "Modified (format): / 21-01-2020 / 15:25:27 / Stefan Vogel"
!
loadedClasses