preferences?

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

preferences?

Stéphane Ducasse
This is nice to see that we are also copied :)
At ESUG it would be good to see the next step in preference cleaning.

Stef

From: Andreas Raab <andreas.raab <at> gmx.de>
Subject: Preference Pragmas redux
Newsgroups: gmane.comp.lang.smalltalk.squeak.general
Date: 2009-08-05 04:52:16 GMT (3 hours and 7 minutes ago)
Folks -

I've just pushed a version of preference pragmas into the trunk. With
preference pragmas, you no longer need to litter Preferences with loose
methods that confuse Monticello and don't get uninstalled. With
preference pragmas, you define your preferences locally (for example as
class variables) and provide an annotation that can be discovered
automatically. A sample preference looks like here:

MyClass>>samplePref
    <preference: 'Sample Preference'
        category: 'My Application'
        description: 'A sample preference in my application'
        type: #Boolean>
    ^SamplePref

The following types of preferences are currently supported: #Boolean,
#String, #Number, and #Color. When a preference is changed, the
accompanying setter method is called.

Preference pragmas will help us get rid of most of the dependencies
between Preferences and the rest of the world. New preference browsers
or entire implementations can easily be written without introducing
unnecessary dependencies by virtue of discovering the annotation.

Cheers,
    - Andreas

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project