[squeak-dev] The Trunk: System-cmm.725.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Apr 27 20:20:53 UTC 2015
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.725.mcz
==================== Summary ====================
Name: System-cmm.725
Author: cmm
Time: 27 April 2015, 3:20:18.66 pm
UUID: b166e202-b3c3-4232-a17e-cd55a873fa50
Ancestors: System-mt.724
- Attempting to load preferences is blowing up, fix by restoring the old one-click behavior.
- Proper fix for browsing allStoresInto: SomeClassVar from: aClassOrMetaclass, so that all stores occurring in either the instance or class side will be revealed even if the browse was initiated from the class-side.
=============== Diff against System-mt.724 ===============
Item was changed:
----- Method: Preferences class>>loadPreferencesFrom: (in category 'personalization') -----
+ loadPreferencesFrom: aFileName
- loadPreferencesFrom: aFile
| stream params dict desktopColor |
+ stream := ReferenceStream fileNamed: aFileName.
- stream := ReferenceStream on: aFile.
params := stream next.
self assert: (params isKindOf: IdentityDictionary).
params removeKey: #PersonalDictionaryOfPreferences.
dict := stream next.
self assert: (dict isKindOf: IdentityDictionary).
desktopColor := stream next.
stream close.
dict keysAndValuesDo:
[:key :value | (self preferenceAt: key ifAbsent: [nil]) ifNotNil:
[:pref | pref preferenceValue: value preferenceValue]].
params keysAndValuesDo: [ :key :value | self setParameter: key to: value ].
Smalltalk isMorphic
ifTrue: [ World fillStyle: desktopColor ]
ifFalse: [ self desktopColor: desktopColor. ScheduledControllers updateGray ].
!
Item was changed:
----- Method: Preferences class>>preferenceAt:ifAbsent: (in category 'preference-object access') -----
preferenceAt: aSymbol ifAbsent: aBlock
"Answer the Preference object at the given symbol, or the value of aBlock if not present"
+ ^self accessDictionaryOfPreferencesIn: [ :dictionaryOfPreferences |
+ dictionaryOfPreferences at: aSymbol ifAbsent: aBlock ]!
- self accessDictionaryOfPreferencesIn: [ :dictionaryOfPreferences |
- dictionaryOfPreferences
- at: aSymbol
- ifPresent: [ :preference | ^preference ] ].
- ^aBlock value!
Item was removed:
- ----- Method: Preferences class>>restorePreferencesFromDisk: (in category 'personalization') -----
- restorePreferencesFromDisk: aFile
- Cursor wait
- showWhile: [[self loadPreferencesFrom: aFile]
- on: Error
- do: [:ex | self inform: 'there was an error restoring the preferences' translated]]!
Item was changed:
----- Method: Preferences class>>storePreferencesToDisk (in category 'personalization') -----
storePreferencesToDisk
+ Cursor wait showWhile: [
+ [ self storePreferencesIn: 'my.prefs' ] on: Error do: [ :ex | self inform: 'there was an error storing your preferences to disk' ]]!
- | newName |
- newName := UIManager default request: 'Please confirm name for save...' initialAnswer: 'myPreferences'.
- newName isEmpty
- ifTrue: [^ self].
- Cursor wait
- showWhile: [[self storePreferencesIn: newName , '.prefs']
- on: Error
- do: [:ex | self inform: 'there was an error storing your preferences to disk. you probably already have stored your preferences' translated]]!
Item was changed:
----- Method: SystemNavigation>>allStoresInto:from: (in category 'query') -----
allStoresInto: varName from: aClass
"Answer a sequence of MewthodReferences for all the receiver's methods
or any methods of a subclass/superclass that assign to the instance variable name."
"self new allStoresInto: 'contents' from: Collection."
| result roots |
result := OrderedCollection new.
(aClass theNonMetaClass inheritsFrom: SharedPool) ifTrue:
[roots := self allClasses select: [:class| class sharedPools includes: aClass theNonMetaClass].
roots do:
[:root|
root withAllSubclassesDo:
[:class|
(class whichMethodsStoreInto: varName),
(class class whichMethodsStoreInto: varName) do:
[:eachMethod|
result add: eachMethod methodReference]]]].
aClass withAllSubAndSuperclassesDo:
[ : class |
+ (class theNonMetaClass whichMethodsStoreInto: varName),
+ (class theMetaClass whichMethodsStoreInto: varName) do:
- (class whichMethodsStoreInto: varName),
- (class class whichMethodsStoreInto: varName) do:
[ : eachMethod |
result add: eachMethod methodReference ] ].
^result!
Item was changed:
----- Method: SystemNavigation>>browseAllStoresInto:from: (in category 'browse') -----
+ browseAllStoresInto: varName from: aClass
- browseAllStoresInto: varName from: aClass
"Create and schedule a Message Set browser for all the receiver's methods
or any methods of a subclass/superclass that refer to the instance variable name."
"self new browseAllStoresInto: 'contents' from: Collection."
^ self
+ browseMessageList: (self allStoresInto: varName from: aClass)
- browseMessageList:
- (self
- allStoresInto: varName
- from: aClass) ,
- ((aClass allClassVarNames includes: varName)
- ifTrue:
- [ self
- allStoresInto: varName
- from: aClass class ]
- ifFalse: [ Array empty ])
name: 'Stores into ' , varName
autoSelect: varName!
More information about the Squeak-dev
mailing list
|