[Cuis-dev] [Change set] Removing a preference
Hilaire Fernandes
hilaire at drgeo.eu
Fri Jun 3 13:41:41 PDT 2022
- Removing a preference may be useful in some circumstance.
* Only issue a warning on Transcript when an updated preference's value
does not match its type.
I have again a completely white screen on a recent image (couple of
hours of use). I just save and quit, image does not start again (white
screen)
--
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
'From Cuis 6.0 [latest update: #5213] on 3 June 2022 at 10:29:28 pm'!
!PreferenceNG class methodsFor: 'removing' stamp: 'hlsf 6/3/2022 22:26:17'!
remove: aPreferenceName
^ self remove: aPreferenceName ifAbsent: [self error: 'Preference ''', aPreferenceName, ''' does not exist']! !
!PreferenceNG class methodsFor: 'removing' stamp: 'hlsf 6/3/2022 22:25:39'!
remove: aPreferenceName ifAbsent: absentBlock
^ ThePreferences removeKey: aPreferenceName ifAbsent: absentBlock ! !
!PreferenceNG methodsFor: 'accessing' stamp: 'hlsf 6/3/2022 11:43:51'!
value: aValue
self isTypeAClass
ifTrue: [
(aValue isKindOf: type) ifFalse: [Transcript show: aValue printString, ' is not a ', type printString].
value _ aValue ]
ifFalse: [ "Should be handled somehow by the preference editor "
value _ aValue].
self triggerEvent: #preferenceChanged with: self! !
!PreferenceNG class reorganize!
('accessing' allPreferences at: at:put: categories instanceAt: selectCategory:)
('removing' remove: remove:ifAbsent:)
('instance creation' name:category:value: name:description:category:type:value:)
('error handling' doesNotUnderstand:)
('class initialization' initialize installDefault:in: installHaloPreferencesWith: installMiscPreferences)
('fileIn/Out' loadFrom: save:to: saveAllTo: saveCategory:to:)
('helpers' detectType:)
('data' iconicHaloSpecifications machineDefault machineSlow machineSmalltalk80 prefFont prefGui prefProgramming prefSystem)
('event handlers' assignmentGlyph: defaultFontSize: machine: menuIcon: pointer:)
('fonts' fontSizes setDefaultFont: setDefaultFont:spec:)
('obsolete' desktopMenuTitle)
('as yet unclassified' openPreferencesInspector)
!
More information about the Cuis-dev
mailing list