Here is the reason why Clipboard was not well initialized and the general 
problem with the startup list if we execute Smalltalk initialize :)

in the startup list not complete (and cannot really because other classes may 
dynamically register themselves)
SmalltalkImage>>initializeStartUpList
        "SmalltalkImage initializeStartUpList"

        | oldList |
        oldList := StartUpList.
        StartUpList := OrderedCollection new.
        "These get processed from the top down..."
        #(
                Delay
                DisplayScreen
                Cursor
                InputEventFetcher
                ProcessorScheduler  "Starts low space watcher and bkground."
                LanguageEnvironment
                FileDirectory  "Enables file stack dump and opens sources."
                NaturalLanguageTranslator
                ShortIntegerArray
                ShortRunArray
                CrLfFileStream
        ) do:[:clsName|
                Smalltalk at: clsName ifPresent:[:cls| Smalltalk 
addToStartUpList: cls].
        ].
        oldList ifNotNil: [oldList do: [:className | Smalltalk at: className
                                                ifPresent: [:theClass | 
Smalltalk addToStartUpList: theClass]]].
        #(
                PasteUpMorph
                "ControlManager"
        ) do:[:clsName|
                Smalltalk at: clsName ifPresent:[:cls| Smalltalk 
addToStartUpList: cls].
        ].
                

Now if we check the classes that have a addToStartUpList: call and that are not 
in the previous list.
We see that we missed a lot of them. 

classes := ((SystemNavigation default allCallsOn: #addToStartUpList:)
collect: [ :e | e methodClass ]),
((SystemNavigation default allCallsOn: #addToStartUpList:after:)
collect: [ :e | e methodClass ]).
classNames := classes collect: [ :n | n instanceSide name ].
(Smalltalk class classVarNamed: 'StartUpList') do: [ :s |
        classNames remove: s ifAbsent: [] ].
classNames asSortedCollection 


a SortedCollection(#AutoStart #CPUWatcher #Clipboard #CommandHistory 
#ExternalSettings #FreeTypeFontProvider #FreeTypeSettings #HostSystemMenus 
#HostWindowProxy #InputEventSensor #InternetConfiguration #Locale #MenuIcons 
#MultiByteFileStream #OSPlatform #ProcessBrowser #SecurityManager 
#SmalltalkImage #SmalltalkImage #SystemDictionary #SystemDictionary #UITheme 
#UUIDGenerator #WeakArray).

InputEventSensor has startup and shutdown but no initialize



Stef
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to