5. PSSliderSpecifier
The PSSliderSpecifier is for selecting a value from a range of values. Table 5 summarizes PSSliderSpecifier’s settings.
Table 5. PSSliderSpecifier Settings
Key | Purpose | Type | Valid Values | Required |
---|
Type | Specifies preference type | String | PSSliderSpecifier | Yes |
Key | Specifies the preference’s key used for storage and retrieval | String | Any string value | Yes |
DefaultValue | Specifies a default value for the preference | Real | Any number between minimum and maximum values | Yes |
MinimumValue | Minimum value for slider | Real | Any number | Yes |
MaximumValue | Maximum value for slider | Real | Any number | Yes |
MinimumValueImage | Path to image (21 × 21 pixels) | String | Valid path | No |
MaximumValueImage | Path to image (21 × 21) pixels | String | Valid path | No |
Return to Root.plist and add a new item below Item 3. Change the newly added item to a Dictionary type. Expand the new Item 4 and add two child rows below it. Assign the first child item’s key to Type, type to String, and value to PSGroupSpecifier. Assign the second child item’s key to Title, type to String, and value to Intensity. Close
Item 4 and add another item after it. Change the new Item 5’s type to
Dictionary. Expand the newly added item and add six child rows. Change
the first child row’s key to Type, type to String, and value to
PSSliderSpecifier. Change the third child row’s key to Key, type to
String, and value to keyFour. Change the fourth child row’s key to
DefaultValue, type to Number, and value to 5. Change the fifth child
row’s key to MinimumValue, type to Number, and value to 0. Change the
sixth child row’s key to MaximumValue, type to Number, and value to 10. Figure 11 shows Root. plist after making the changes.
Click Run, and the changes appear in the Settings application (Figure 12).
|
6. PSChildPaneSpecifier
The
PSChildPaneSpecifier is for specifying a child pane in the Settings
application. You define the settings in this pane in a separate .plist
file. Table 6 summarizes PSChildSpecifier’s settings.
Table 6. PSChildPaneSpecifier Settings
Key | Purpose | Type | Valid Values | Required |
---|
Type | Specifies preference type. | String | PSChildPaneSpecifier | Yes |
Title | Specifies the title displayed by the Settings application. | String | Any string value | Yes |
File | Specifies the file used for the child pane. | String | The .plist file name without the extension | Yes |
Return to Root.plist and add Item 6. Change its type to Dictionary. Expand and add three child rows.
Change
the first child row’s key to Type, type to String, and value to
PSChildPaneSpecifier. Change the second child row’s key to Title, type
to String, and value to Shade. Change the third child row’s key to File,
type to String, and value to Shades (Figure 13).
Create a new property list (Figure 14). Name the file Shades.
Open Shades.plist in the editor and add one row. Change the row’s key to Title, type to String, and value to Shades (Figure 15).
Click Build And Go. The change is reflected in the Settings application (Figure 16).