The kitchen sink example may not be correct because there was a merge issue
that caused my adjustment to its preference handling to go away. [My commit
with the proper use of prefs](
https://github.com/mackenza/brackets-kitchen-sink/blob/ee68d173d6e0b4ba687cb2ffa62c1ace3dbc5250/main.js)
*should* work.


On Wed, May 7, 2014 at 4:43 PM, Miguel Castillo @manchagnu <
notifications@github.com> wrote:

> In src/themes/SettingsManager.js:
>
> > +                result[key.substr(pathLength)] = value;
> > +            }
> > +        });
> > +    };
> > +
> > +    Settings.reset = function() {
> > +        Settings.setValue("theme",  DefaultSettings.theme);
> > +        Settings.setValue("fontSize", DefaultSettings.fontSize + "px");
> > +        Settings.setValue("lineHeight", DefaultSettings.lineHeight);
> > +        Settings.setValue("fontType", DefaultSettings.fontType);
> > +        Settings.setValue("customScrollbars", DefaultSettings.customScrollbars);
> > +    };
> > +
> > +
> > +    function init() {
> > +        return PreferencesManager.ready.then(function() {
>
> @dangoor <https://github.com/dangoor> I have switched over to
> definePreference. Following the kitchen and sink example of doing a
> definePreference and listening for changes does not seem to behave the way
> I would expect.
>
> That is, that if the value has not yet been defined, doing a get after the
> definePreference does not return the correct value. It returns undefined.
> Is that expected?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/adobe/brackets/pull/7616/files#r12401345>
> .
>