The Trunk: System-kfr.695.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-kfr.695.mcz

commits-2
Karl Ramberg uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-kfr.695.mcz

==================== Summary ====================

Name: System-kfr.695
Author: kfr
Time: 9 January 2015, 11:31:58.576 pm
UUID: 808d324c-59a1-0e42-b83c-c70a7491f7b7
Ancestors: System-kfr.694

Fix a image lock up with preference look up

=============== Diff against System-kfr.694 ===============

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
+                         ifPresent: [ :preference | ^preference ] ].
+         ^aBlock value!
- ^self accessDictionaryOfPreferencesIn: [ :dictionaryOfPreferences |
- dictionaryOfPreferences at: aSymbol ifAbsent: aBlock ]!

Item was changed:
  ----- Method: Preferences class>>togglePreference: (in category 'get/set') -----
  togglePreference: prefSymbol
  "Toggle the given preference. prefSymbol must be of a boolean preference"
+ (self preferenceAt: prefSymbol ifAbsent: [self error: 'unknown preference: ', prefSymbol]) togglePreferenceValue!
- (self preferenceAt: prefSymbol ifAbsent: [self inform: 'unknown preference: ', prefSymbol]) togglePreferenceValue!