Le 11/05/2010 14:13, Mariano Martinez Peck a écrit :


On Tue, May 11, 2010 at 1:55 PM, Alain Plantec <[email protected] <mailto:[email protected]>> wrote:

    Hi Mariano, all
    Le 11/05/2010 11:43, Mariano Martinez Peck a écrit :

        Hi Alain. DEVImageCreator  has to be updated to use the new
        preferences. I can do it but it will require much more than
        for me than for you ;)

        For preferences it is  DEVImageCreator >> setDefaultPreferences
        it is using Preferences class for the moment. It should be
        updated to use Settings, isn't it ?

    I don't think so. There is no need for such a initialization
    anymore since package are defining their own preferences.
    If a default value is desired then it should be set by an
    initialization method or lazily by the getter.
    I find the lazy initialization better because then, the
    SettingBrowser can reset the preference to the default by setting
    it to nil.


But maybe the default value in the "PharoCore" is not the same as PharoDev? I mean, suppose these are the default prefrences we used in the pharo dev image
ok, there is only one default.
For this need, you should have to create a setting style for pharodev and load it.
as an example:

PharoDevSettingStyle class >>styleName
    "notice the pragma which allow the setting
    browser to recognize the class as a style"
<settingstyle>
    ^ 'PharoDev'

PharoDevSettingStyle>>load
    "set your default 1.1 preferences here"
    CodeHolder showAnnotationPane: false.
    UITheme currentSettings fastDragging: true.
    SystemWindow fullScreenMargin: 25.
    MorphicModel keyboardFocusOnMouseDown: true.
    UITheme currentAnimationSettings useAnimation: false.
    "etc ... "

PharoDevSettingStyle>>loadStyle
    self load

Then, in order to load the style, evaluate
PharoDevSettingStyle new load.


Or, if you don't want to search for where are the preferences and how to set them, simply, open a SettingBrowser then set the settings then create a Style named 'PharoDev'.
The PharoDevSettingStyle class will be created for you.


If we used to do this, I guess it was becuase most of the default preferences of the core image was different. Otherwise, this method doesn't have sense.
of course yes :)

Alain



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

Reply via email to