Mantis - Squeak
Viewing Issue Advanced Details
7306 System minor always 03-04-09 06:52 04-18-10 22:05
andreas  
andreas  
normal  
closed  
fixed  
none    
none trunk  
0007306: Preference pragmas
Preferences compile programmatic accessors in Preferences and are generally hard to use. The change set provides a preference pragma which allows one to define a preference via:

myPreferenceValue
    <preference: 'Preference Name'
        category: 'category'
        description: 'Help information'
        type: #Boolean>
    ^MyPreferenceValue

myPreferenceValue: aBool
    MyPreferenceValue := aBool.

See class PreferenceExample for an example of use preference pragmas.
 PreferencePragmas.1.cs [^] (5,841 bytes) 03-04-09 06:52
 PreferencePragmas.2.cs [^] (6,301 bytes) 03-06-09 04:22
 PreferencePragmas.3.cs [^] (8,741 bytes) 03-10-09 04:53

Notes
(0013004)
andreas   
03-04-09 06:53   
"fix begin"
Installer mantis bug: 7306 fix: 'PreferencePragmas.3.cs'.
Preferences registerForEvents.
"fix end"

(0013009)
andreas   
03-06-09 04:24   
The latest installment has complete auto-discovery so no more class initializations need to be called.
(0013034)
andreas   
03-10-09 04:54   
This version retrieves the preference value directly from the source (no internal caching) and provides the preference:category:description:type: method.