Re: Understanding Preferences
Andreas Franz <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <[email protected]> |
Am Dienstag, 10. September 2013 01:39:02 UTC+2 schrieb [email protected]: > I need a little expert mentoring on Preferences. I am building a stand alone application and have a very basic prefs.js file for it. The contents of which look like this. > > > > pref("toolkit.defaultChromeURI", "chrome://SCDBII/content/scdbii.xul"); > > pref("browser.chromeURL", "chrome://browser/content/browser.xul"); > > pref("toolkit.defaultChromeFeatures", "chrome,resizable,close=no"); > > pref("toolkit.singletonWindowType", "scdbii_main"); > > user_pref("capability.principal.codebase.scdbii.granted","UniversalXPConnect"); > > pref("scdbii.maximum.size","5500"); > > > > > > In my app, I have a prefwindow with one field that corresponds to the last line of the prefs.js file (scdbii.maximum.size). I've successfully been able to get and set this pref value. However, the prefs.js file is not reflecting the changes. I can exit/restart the app and even restart my computer and the updated pref settings are there and not reflected in the file itself. > > > > I can't seem to find anything in the scattered documentation that would explain this. So my question is: how exactly is this working? Where is XUL/XPCOM storing my preferences and the updates to them? > > > > Thanks in advance. If you're using a windows machine the preferences are stored under C:\Users\%USER_PROFILE%\AppData\Roaming\%VENDOR_NAME%\%APP_NAME%\Profiles\xxxxxxx.default/prefs.js Make sure that you install the app with the --install-app option and not only start it from the command line.