Autoload.st
changeset 21767 070cc7414a41
parent 21403 8f0baf55adbb
child 22937 8905c05c3a4b
equal deleted inserted replaced
21766:4974e66281d4 21767:070cc7414a41
    69     the 'patches' startup script recursively walks along all directories
    69     the 'patches' startup script recursively walks along all directories
    70     below the TOP directory (that is one above the stx folder),
    70     below the TOP directory (that is one above the stx folder),
    71     and installs autoload stubs for all .st class files found, for which no
    71     and installs autoload stubs for all .st class files found, for which no
    72     corresponding class is already present.
    72     corresponding class is already present.
    73     As you can imagine, this takes a long time and makes the initial startup quite slow.
    73     As you can imagine, this takes a long time and makes the initial startup quite slow.
    74     Therefore, this scheme is no longer the recommended one and we (at exept)
    74     Therefore, this scheme is no longer the recommended one and we (at eXept)
    75     always start ST/X with the '--quick' option, which skips this scan operation.
    75     always start ST/X with the '--quick' option, which skips this scan operation.
    76     Late note: 
    76     Late note:
    77         --quick is now (7.1.1) the default. 
    77         --quick is now (7.1.1) the default.
    78         To force an autoload scan, start stx with a --autoload argument.
    78         To force an autoload scan, start stx with a --autoload argument.
    79     
    79 
    80     
    80 
    81     Advantage of Autoload stubs:
    81     Advantage of Autoload stubs:
    82     Autoload stubs make it easier for a beginner to ST/X, to see what frameworks and classes
    82     Autoload stubs make it easier for a beginner to ST/X, to see what frameworks and classes
    83     are there, as they appear in the browser with category and class name (although no
    83     are there, as they appear in the browser with category and class name (although no
    84     more details are initially visible.
    84     more details are initially visible.
    85 
    85 
   109 
   109 
   110 !Autoload class methodsFor:'initialization'!
   110 !Autoload class methodsFor:'initialization'!
   111 
   111 
   112 initialize
   112 initialize
   113     "initialize either the Autoload class
   113     "initialize either the Autoload class
   114      or load a autoloaded class and initialize it."
   114      or load an autoloaded class and initialize it."
   115 
   115 
   116     self ~~ Autoload ifTrue:[
   116     self ~~ Autoload ifTrue:[
   117         "subclass: catch initialize - load the class and resend #initialize to the real one"
   117         "subclass: catch initialize - load the class and resend #initialize to the real one"
   118         ^ self doesNotUnderstand:(Message selector:#initialize)
   118         ^ self doesNotUnderstand:(Message selector:#initialize)
   119     ].
   119     ].
   134     ].
   134     ].
   135     InProgressClasses isNil ifTrue:[
   135     InProgressClasses isNil ifTrue:[
   136         InProgressClasses := IdentitySet new.
   136         InProgressClasses := IdentitySet new.
   137     ].
   137     ].
   138 
   138 
   139 
   139     "Modified: / 20-05-1997 / 19:06:25 / cg"
   140     "Modified: / 20.5.1997 / 19:06:25 / cg"
   140     "Modified: / 03-08-1999 / 14:23:30 / stefan"
   141     "Modified: / 3.8.1999 / 14:23:30 / stefan"
   141     "Modified (comment): / 22-05-2017 / 18:31:47 / mawalch"
   142 ! !
   142 ! !
   143 
   143 
   144 !Autoload class methodsFor:'Signal constants'!
   144 !Autoload class methodsFor:'Signal constants'!
   145 
   145 
   146 autoloadFailedSignal
   146 autoloadFailedSignal
   541 ! !
   541 ! !
   542 
   542 
   543 !Autoload class methodsFor:'message catching'!
   543 !Autoload class methodsFor:'message catching'!
   544 
   544 
   545 at:arg
   545 at:arg
   546     "catch at: - redefined because its understood"
   546     "catch at: - redefined because it is understood"
   547 
   547 
   548     ^ self doesNotUnderstand:(Message selector:#at: argument:arg)
   548     ^ self doesNotUnderstand:(Message selector:#at: argument:arg)
       
   549 
       
   550     "Modified (comment): / 22-05-2017 / 18:31:12 / mawalch"
   549 !
   551 !
   550 
   552 
   551 basicNew
   553 basicNew
   552     "catch basicNew - load the class and send it to the real one"
   554     "catch basicNew - load the class and send it to the real one"
   553 
   555 
   629 
   631 
   630     "Modified: 26.5.1997 / 14:59:52 / cg"
   632     "Modified: 26.5.1997 / 14:59:52 / cg"
   631 !
   633 !
   632 
   634 
   633 new:arg
   635 new:arg
   634     "catch new: - load the class and resend #new: it to the real one"
   636     "catch new: - load the class and resend #new: to the real one"
   635 
   637 
   636     ^ self doesNotUnderstand:(Message selector:#new: argument:arg)
   638     ^ self doesNotUnderstand:(Message selector:#new: argument:arg)
   637 
   639 
   638     "Modified: 26.5.1997 / 14:59:58 / cg"
   640     "Modified: / 26-05-1997 / 14:59:58 / cg"
       
   641     "Modified (comment): / 22-05-2017 / 18:32:43 / mawalch"
   639 !
   642 !
   640 
   643 
   641 privateClassesAt:aClassNameString
   644 privateClassesAt:aClassNameString
   642     "catch  - load the class and send it to the real one"
   645     "catch  - load the class and send it to the real one"
   643 
   646 
   678 
   681 
   679     "Created: 22.5.1996 / 23:04:49 / stefan"
   682     "Created: 22.5.1996 / 23:04:49 / stefan"
   680 !
   683 !
   681 
   684 
   682 respondsTo:aSelector
   685 respondsTo:aSelector
   683     "catch respondsTo: - load the class and resend #respondsTo: it to the real one"
   686     "catch respondsTo: - load the class and resend #respondsTo: to the real one"
   684 
   687 
   685     self == Autoload ifTrue:[
   688     self == Autoload ifTrue:[
   686         ^ super respondsTo:aSelector
   689         ^ super respondsTo:aSelector
   687     ].
   690     ].
   688     ^ self doesNotUnderstand:(Message selector:#respondsTo: argument:aSelector)
   691     ^ self doesNotUnderstand:(Message selector:#respondsTo: argument:aSelector)
   689 
   692 
   690     "Modified: 26.5.1997 / 14:59:58 / cg"
   693     "Modified: / 26-05-1997 / 14:59:58 / cg"
       
   694     "Modified (comment): / 22-05-2017 / 18:33:08 / mawalch"
   691 !
   695 !
   692 
   696 
   693 value
   697 value
   694     "catch value - load the class and resend #value to the real one"
   698     "catch value - load the class and resend #value to the real one"
   695 
   699