Michael J. Sherman wrote:
Is there any way to store arrays of items? For example, I have a group
of 3-4 settings, but the user can create multiple "sets" of these
settings, but it looks like the PrefService is a single key/value kinda
of setup.
Right now I'm leaning towards just a file stored in the prefs directory
and read/write XML to that to store this info.
Mozilla currently handles that kind of situation by using numbered prefs:
pref.setting.1.foo
pref.setting.1.bar
pref.setting.2.foo
pref.setting.2.bar
You can use XML in the profile, but please be aware of all of the
stability and management work that is part of the mozilla preferences
implementation: it has been tuned so that preferences are not lost if
the computer crashes while they are being written (safe output
stream)... it also has support for reading default preferences from
extensions, as well as locking preferences in administered settings.
--BDS
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom