When using InAppSettingsKit, I see a few ways that different plist files are used, 1) when using a childpane or 2) when using a list.
I want to be able to reuse a plist file but have the keys for the different settings be different. This would allow me to reuse the same file but have different settings stored.
ie. something like: CommonSettings.plist
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>A_COMMON_SETTING</string>
<key>Key</key>
<string>${unique}_setting_value</string>
<key>DefaultValue</key>
<integer>1</integer>
</dict>
</array>
</dict>
</plist>
Note: I'm already taking the values/titles using the valuesFor
and titlesFor
delegate methods for the PSMultiValueSpecifier
.
One way I though about doing this was using the list functionality without an Add capability but that didn't work since the AddSpecifier seems required even though the documentation states:
Optionally, a list group also has an AddSpecifier
(My program crashed without it)
Note: I did take a look at this question but I'm already comfortable using different plist
files, I'm looking to reuse them.