Autoload.st
changeset 345 cf2301210c47
parent 328 7b542c0bf1dd
child 356 6c5ce0e1e7a8
equal deleted inserted replaced
344:4b35f99afefb 345:cf2301210c47
    19 
    19 
    20 Autoload comment:'
    20 Autoload comment:'
    21 COPYRIGHT (c) 1991 by Claus Gittinger
    21 COPYRIGHT (c) 1991 by Claus Gittinger
    22 	      All Rights Reserved
    22 	      All Rights Reserved
    23 
    23 
    24 $Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.20 1995-05-01 21:27:56 claus Exp $
    24 $Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.21 1995-05-16 17:05:32 claus Exp $
    25 '!
    25 '!
    26 
    26 
    27 !Autoload class methodsFor:'documentation'!
    27 !Autoload class methodsFor:'documentation'!
    28 
    28 
    29 copyright
    29 copyright
    40 "
    40 "
    41 ! 
    41 ! 
    42 
    42 
    43 version
    43 version
    44 "
    44 "
    45 $Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.20 1995-05-01 21:27:56 claus Exp $
    45 $Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.21 1995-05-16 17:05:32 claus Exp $
    46 "
    46 "
    47 !
    47 !
    48 
    48 
    49 documentation
    49 documentation
    50 "
    50 "
    82 	self setSuperclass:nil.
    82 	self setSuperclass:nil.
    83 	ObjectMemory flushCaches.
    83 	ObjectMemory flushCaches.
    84     ]
    84     ]
    85 ! !
    85 ! !
    86 
    86 
    87 !Autoload class methodsFor:'signal access'!
    87 !Autoload class methodsFor:'Signal constants'!
    88 
    88 
    89 autoloadFailedSignal
    89 autoloadFailedSignal
    90     "return the signal raised when an autoload fails"
    90     "return the signal raised when an autoload fails"
    91 
    91 
    92     ^ AutoloadFailedSignal
    92     ^ AutoloadFailedSignal
   109     ^ LoadedClasses notNil and:[LoadedClasses includes:aClass]
   109     ^ LoadedClasses notNil and:[LoadedClasses includes:aClass]
   110 ! !
   110 ! !
   111 
   111 
   112 !Autoload class methodsFor:'lazy compilation'!
   112 !Autoload class methodsFor:'lazy compilation'!
   113 
   113 
       
   114 compileLazy
       
   115     "return the lazy loading flag - if on, fileIn is much faster,
       
   116      but pauses are to be expected later, since methods are compiled
       
   117      when first executed."
       
   118 
       
   119     ^ LazyLoading
       
   120 !
       
   121 
   114 compileLazy:aBoolean
   122 compileLazy:aBoolean
   115     "turn on/off lazy loading - if on, fileIn is much faster,
   123     "turn on/off lazy loading - if on, fileIn is much faster,
   116      but pauses are to be expected later.
   124      but pauses are to be expected later, since methods are compiled
       
   125      when first executed.
   117      If you like it, add a line to your startup file."
   126      If you like it, add a line to your startup file."
   118 
   127 
   119     LazyLoading := aBoolean
   128     LazyLoading := aBoolean
   120 ! !
   129 ! !
   121 
   130 
   198 
   207 
   199     "wow - it worked. now the big trick ..."
   208     "wow - it worked. now the big trick ..."
   200 
   209 
   201     self become:newClass.
   210     self become:newClass.
   202     LoadedClasses rehash.
   211     LoadedClasses rehash.
   203     self initialize.  		"/ thats the new class now
   212     self initialize.            "/ thats the new class now
   204     self postAutoload.
   213     self postAutoload.
   205     ^ self  "this is now the new class - see what doesNotUnderstand: does with it"
   214     ^ self  "this is now the new class - see what doesNotUnderstand: does with it"
   206 ! !
   215 ! !
   207 
   216 
   208 !Autoload class methodsFor:'message catching'!
   217 !Autoload class methodsFor:'message catching'!