[squeak-dev] The Trunk: PreferenceBrowser-ar.37.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Aug 26 02:40:22 UTC 2009


Andreas Raab uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-ar.37.mcz

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

Name: PreferenceBrowser-ar.37
Author: ar
Time: 25 August 2009, 7:40:04 am
UUID: 785c75e7-2a46-6e47-9928-9e5b84d6e2a1
Ancestors: PreferenceBrowser-ar.36

A fix for clients using custom view registries, such as polymorph. Without a bi-directional mapping between type and view registry these become inaccessible leading to problems if one actually tries to use one.

=============== Diff against PreferenceBrowser-ar.36 ===============

Item was changed:
  ----- Method: PreferenceViewRegistry class>>typeOfRegistry: (in category 'accessing') -----
  typeOfRegistry: aRegistry
  	"Answer the type name for a particular view registry"
  	^aRegistry caseOf:{
  		[self ofBooleanPreferences]	-> [#Boolean].
  		[self ofColorPreferences]		-> [#Color].
  		[self ofFontPreferences]		-> [#Font].
  		[self ofNumericPreferences]	-> [#Number].
  		[self ofTextPreferences]		-> [#String].
  		[self ofHaloThemePreferences]	-> [#Halo].
  		[self registryOf: #windowColorPreferences]	-> [#WindowColor].
+ 	} otherwise:[self registries keyAtIdentityValue: aRegistry ifAbsent:[nil]].!
- 	} otherwise:[nil]!

Item was changed:
  ----- Method: PreferenceViewRegistry class>>forType: (in category 'accessing') -----
  forType: typeName
  	"Answer the preference registry for the given type name"
  	^typeName caseOf:{
  		[#Boolean]	->	[self ofBooleanPreferences].
  		[#Color]	->	[self ofColorPreferences].
  		[#Font]		->	[self ofFontPreferences].
  		[#Number]	->	[self ofNumericPreferences].
  		[#String]	->	[self ofTextPreferences].
  		[#Halo]		->	[self ofHaloThemePreferences].
  		[#WindowColor]	-> [self registryOf: #windowColorPreferences]
+ 	} otherwise:[self registryOf: typeName].!
- 	} otherwise:[nil]!




More information about the Squeak-dev mailing list