MozillaZine

JavaScript Preferences Class

From MozillaZine Knowledge Base

(Difference between revisions)
Revision as of 20:06, 9 March 2005
Grimholtz (Talk | contribs)
(removed class until functions can be taken out of global scope)
<-- Previous diff
Revision as of 01:47, 26 March 2005
Fatalis (Talk | contribs)

Next diff -->
Line 1: Line 1:
-==Javascript Preferences Class==+==JavaScript Preferences Class==
This class encapsulates many of the commonly used features of Mozilla's preferences-related interfaces into a centralized, reusable class. It traps exceptions, allows you to specify default values for preferences when they don't exist in any preference tree, and keeps code organized by localizing preference manipulation to a single class. The only interfaces not yet supported are nsILocalFile and nsIRelativeFilePref. Feel free to add them if you like. Sample usage is shown in the leading comments. This class encapsulates many of the commonly used features of Mozilla's preferences-related interfaces into a centralized, reusable class. It traps exceptions, allows you to specify default values for preferences when they don't exist in any preference tree, and keeps code organized by localizing preference manipulation to a single class. The only interfaces not yet supported are nsILocalFile and nsIRelativeFilePref. Feel free to add them if you like. Sample usage is shown in the leading comments.
<pre>Code temporarily taken down for maintanence</pre> <pre>Code temporarily taken down for maintanence</pre>

Revision as of 01:47, 26 March 2005

JavaScript Preferences Class

This class encapsulates many of the commonly used features of Mozilla's preferences-related interfaces into a centralized, reusable class. It traps exceptions, allows you to specify default values for preferences when they don't exist in any preference tree, and keeps code organized by localizing preference manipulation to a single class. The only interfaces not yet supported are nsILocalFile and nsIRelativeFilePref. Feel free to add them if you like. Sample usage is shown in the leading comments.

Code temporarily taken down for maintanence