'From Squeak3.1alpha of 28 February 2001 [latest update: #4262] on 19 August 2001 at 8:45:54 am'! "Change Set: reusePreference-sw Date: 19 August 2001 Author: Scott Wallace When a preference is added (via one of the #addPreference:... variants), a pre-existing Preference object for the given symbol, if one exists, is reused, thus allowing UI elements (checkboxes, for example) that interacted with the old Preference object to continue to work."! !Preferences class methodsFor: 'add preferences' stamp: 'sw 8/19/2001 08:28'! addPreference: prefSymbol categories: categoryList default: aValue balloonHelp: helpString projectLocal: localBoolean changeInformee: informeeSymbol changeSelector: aChangeSelector "Add or replace a preference as indicated. Reuses the preexisting Preference object for this symbol, if there is one, so that UI artifacts that interact with it will remain valid." | aPreference | aPreference _ DictionaryOfPreferences at: prefSymbol ifAbsent: [Preference new]. aPreference name: prefSymbol defaultValue: aValue helpString: helpString localToProject: localBoolean categoryList: categoryList changeInformee: informeeSymbol changeSelector: aChangeSelector. DictionaryOfPreferences at: prefSymbol put: aPreference. self compileAccessMethodForPreference: aPreference! ! !Preferences class methodsFor: 'preferences panel' stamp: 'sw 8/19/2001 08:19'! openNewPreferencesPanel "Create and open a new Preferences Panel" self openFactoredPanelWithWidth: 370 "Preferences openNewPreferencesPanel"! !