Hi -
With the latest updates both Services and PreferenceBrowser should now
be un- and reloadable. To unload Services (which depends on
PreferenceBrowser and consequently needs to be unloaded first) execute:
SystemChangeNotifier uniqueInstance
noMoreNotificationsFor: ServiceRegistry.
(MCPackage named: 'Services-Base') unload.
and to unload PB:
(MCPackage named: 'PreferenceBrowser') unload.
"Clean out various obsolete references"
TheWorldMainDockingBar updateInstances.
TheWorldMenu removeObsolete.
Flaps disableGlobalFlaps: false.
Flaps enableGlobalFlaps
To load them back in simply load the packages (PB first, then
Services-Base) from source.squeak.org:
(Installer repository: 'http://source.squeak.org/trunk')
install: 'PreferenceBrowser';
install: 'Services-Base'.
TheWorldMainDockingBar updateInstances.
Flaps disableGlobalFlaps: false.
Flaps enableGlobalFlaps
Have people tried unloading other packages? I'd like to start assembling
the scripts in one place so that we can track our progress. Ultimately,
I'd like to have a script which unloads everything we know how to
unload, ensures that no Undeclared or obsolete behaviors remain, run the
remaining test cases, then reload the packages again, and rerun the
tests. If we can do this consistently we should know quite well how
close we are towards a kernel image.
Cheers,
- Andreas
Andreas Raab uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-ar.42.mcz
==================== Summary ====================
Name: PreferenceBrowser-ar.42
Author: ar
Time: 3 January 2010, 12:01:24 pm
UUID: 1685275b-f40d-e44a-aa43-41ebacfd4d2e
Ancestors: PreferenceBrowser-nice.41
Guard unload operations of view registries. When unloading the entire package the unload can fail due to previously removed view registry.
=============== Diff against PreferenceBrowser-nice.41 ===============
Item was changed:
----- Method: PBNumericPreferenceView class>>unload (in category 'class initialization') -----
unload
+ "Unload order is not guaranteed so guard against failure"
+ [PreferenceViewRegistry ofNumericPreferences unregister: self] on: Error do:[].!
- PreferenceViewRegistry ofNumericPreferences unregister: self.!
Item was changed:
----- Method: PBBooleanPreferenceView class>>unload (in category 'class initialization') -----
unload
+ "Unload order is not guaranteed so guard against failure"
+ [PreferenceViewRegistry ofBooleanPreferences unregister: self] on Error do:[].!
- PreferenceViewRegistry ofBooleanPreferences unregister: self.!
Item was changed:
----- Method: PBColorPreferenceView class>>unload (in category 'class initialization') -----
unload
+ "Unload order is not guaranteed so guard against failure"
+ [PreferenceViewRegistry ofColorPreferences unregister: self] on: Error do:[]!
- PreferenceViewRegistry ofColorPreferences unregister: self.!
Item was changed:
----- Method: PBWindowColorPreferenceView class>>unload (in category 'class initialization') -----
unload
+ "Unload order is not guaranteed so guard against failure"
+ [self viewRegistry unregister: self] on: Error do:[]!
- self viewRegistry unregister: self.!
Item was changed:
----- Method: PBHaloThemePreferenceView class>>unload (in category 'class initialization') -----
unload
+ "Unload order is not guaranteed so guard against failure"
+ [PreferenceViewRegistry ofHaloThemePreferences unregister: self] on: Error do:[]!
- PreferenceViewRegistry ofHaloThemePreferences unregister: self.!
Item was changed:
----- Method: PBTextPreferenceView class>>unload (in category 'class initialization') -----
unload
+ "Unload order is not guaranteed so guard against failure"
+ [PreferenceViewRegistry ofTextPreferences unregister: self] on: Error do:[]!
- PreferenceViewRegistry ofTextPreferences unregister: self.!
Andreas Raab uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ar.215.mcz
==================== Summary ====================
Name: System-ar.215
Author: ar
Time: 2 January 2010, 11:58:38 am
UUID: df1e6d6a-aa1b-684e-a45e-1f3376185a67
Ancestors: System-ar.214
Remove Preference>>viewRegistry which is no longer used.
=============== Diff against System-ar.214 ===============
Item was changed:
Object subclass: #Preference
+ instanceVariableNames: 'name value defaultValue helpString localToProject categoryList changeInformee changeSelector type'
- instanceVariableNames: 'name value defaultValue helpString localToProject categoryList changeInformee changeSelector viewRegistry type'
classVariableNames: ''
poolDictionaries: ''
category: 'System-Preferences'!
!Preference commentStamp: '<historical>' prior: 0!
Represents a true/false flag that is under user control and which can be interrogated by a call to Preferences
viewRegistry the registry of the classes responsible for building my view
name a symbol, the formal name of the preference.
value a boolean, the current value
defaultValue the default value of the preference
helpString string or text, constituting the help message
localToProject boolean, whether each project holds its own version
categoryList list of categories under which to offer this
changeInformee whom, if anyone, to inform if the value changes:
changeSelector what selector to send to the changeInformee when the value changes!
Item was changed:
----- Method: Preference>>type (in category 'accessing') -----
type
"The type of this preference. One of #Boolean, #Color, #String, #Font, #Number etc."
+ ^type!
- ^type ifNil:[
- "For migration away from storing preference registries here"
- type := PreferenceViewRegistry typeOfRegistry: viewRegistry].!
Item was removed:
- ----- Method: Preference class>>initialize (in category 'class initialization') -----
- initialize
- "Ensure that all preferences have their type set correctly before removing viewRegistry"
- self allSubInstancesDo:[:pref| pref type].
- !
Andreas Raab uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ar.214.mcz
==================== Summary ====================
Name: System-ar.214
Author: ar
Time: 2 January 2010, 11:48:43 am
UUID: f29cb3bf-c6c0-394b-9fac-cc28ee2d0292
Ancestors: System-nice.213
- Flush all MC caches before updating. Solves problems when a previous update failed to load.
- Prepare to remove viewRegistry from Preference.
=============== Diff against System-nice.213 ===============
Item was changed:
----- Method: Utilities class>>updateFromServer (in category 'fetching updates') -----
updateFromServer
+ "Update the image by loading all pending updates from the server."
- "Update the image by loading all pending updates from the server. Also save local copies of the update files if the #updateSavesFile preference is set to true"
| config |
+ "Flush all caches. If a previous download failed this is often helpful"
+ MCFileBasedRepository flushAllCaches.
config := MCMcmUpdater updateFromRepositories: #(
'http://source.squeak.org/trunk'
).
self setSystemVersionFromConfig: config.
self inform: 'Update completed.
+ Current update number: ', SystemVersion current highestUpdate.!
- Current update number: ', SystemVersion current highestUpdate.
- "self readServerUpdatesSaveLocally: Preferences updateSavesFile updateImage: true"!
Item was added:
+ ----- Method: Preference class>>initialize (in category 'class initialization') -----
+ initialize
+ "Ensure that all preferences have their type set correctly before removing viewRegistry"
+ self allSubInstancesDo:[:pref| pref type].
+ !
Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.280.mcz
==================== Summary ====================
Name: Morphic-ar.280
Author: ar
Time: 2 January 2010, 2:55:39 am
UUID: 7a46adae-0f5d-0b40-9ff4-c0e33a410cb8
Ancestors: Morphic-dtl.279
Time to take the plunge: The Cuis editors have been working great for a long time now, so switch to using them exclusively and remove the preference allowing to switch back (one can still switch back by changing the defaultEditorClass manually). Also, fixes one annoying incompatibility with Cuis editors namely that the default was not to allow selection shrinking.
=============== Diff against Morphic-dtl.279 ===============
Item was added:
+ ----- Method: Editor class>>selectionsMayShrink (in category 'preferences') -----
+ selectionsMayShrink
+ <preference: 'Selections may shrink'
+ category: 'Morphic'
+ description: 'When true, allows selection to shrink when using shift+cursor keys'
+ type: #Boolean>
+ ^SelectionsMayShrink ifNil:[true]!
Item was changed:
Object subclass: #Editor
instanceVariableNames: 'sensor morph selectionShowing'
+ classVariableNames: 'SelectionsMayShrink'
- classVariableNames: ''
poolDictionaries: ''
category: 'Morphic-Text Support'!
!Editor commentStamp: '<historical>' prior: 0!
New text editors.
TextEditor provides most of the functionality that used to be in TextMorphEditor. This class is no longer a Controller!!
SmalltalkEditor is has Smalltalk code specific features.
SimpleEditor provides basic functionality for single line text editing. It does not handle fonts and styles, aligning and Smalltalk utilities. It handles one single line.
CellStyleEditor allows entering alphabetic characters using only number keys, like most cell phones do.!
Item was changed:
----- Method: Editor>>setIndices:forward: (in category 'private') -----
setIndices: shiftPressed forward: forward
"Little helper method that sets the moving and fixed indices according to some flags."
| indices |
indices _ Dictionary new.
+ (shiftPressed and:[self class selectionsMayShrink])
- (shiftPressed and:[Preferences selectionsMayShrink])
ifTrue: [
indices at: #moving put: self pointIndex.
indices at: #fixed put: self markIndex
] ifFalse: [
forward
ifTrue:[
indices at: #moving put: self stopIndex.
indices at: #fixed put: self startIndex.
] ifFalse: [
indices at: #moving put: self startIndex.
indices at: #fixed put: self stopIndex.
]
].
^indices!
Item was added:
+ ----- Method: Editor class>>selectionsMayShrink: (in category 'preferences') -----
+ selectionsMayShrink: aBool
+ SelectionsMayShrink := aBool.!
Item was changed:
----- Method: TextMorph class>>initialize (in category 'class initialization') -----
initialize "TextMorph initialize"
"Initialize the default text editor class to use"
+ DefaultEditorClass := SmalltalkEditor.
- DefaultEditorClass := TextMorphEditor.
"Initialize constants shared by classes associated with text display."
CaretForm := (ColorForm extent: 16@5
fromArray: #(2r001100e26 2r001100e26 2r011110e26 2r111111e26 2r110011e26)
offset: -2@0)
colors: (Array with: Color transparent with: Preferences textHighlightColor).
self registerInFlapsRegistry.
!
Item was removed:
- ----- Method: TextMorph class>>useNewEditors: (in category 'preferences') -----
- useNewEditors: aBool
- "Enable/disable the new text editors"
- self defaultEditorClass: (aBool ifTrue:[SmalltalkEditor] ifFalse:[TextMorphEditor])!
Item was removed:
- ----- Method: TextMorph class>>useNewEditors (in category 'preferences') -----
- useNewEditors
- "Enable/disable the new text editors"
- <preference: 'Use New Editors'
- category: 'Morphic'
- description: 'When true, use the new (Cuis-based) editors'
- type: #Boolean>
- ^DefaultEditorClass == SmalltalkEditor!