Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

SCPreferencesMBS class

Super class: CFObjectMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class SystemConfiguration MBS MacCF Plugin 4.2 Yes No No Yes, macOS only No
Function: A class for System Configuration Preferences.
Please remember that you may need root access to change something.

The SCPreferences classes allow an application to load and store XML configuration data in a controlled manner and provide the necessary notifications to other applications that need to be aware of configuration changes.

The stored XML configuration data is accessed using a prefsID. A
nil value indicates that the default system preferences are to be accessed.
A string which starts with a leading "/" character specifies the path to the file containing te preferences to be accessed. A string which does not start with a leading "/" character specifies a file relative to the default system preferences directory.

The Path APIs make certain assumptions about the layout of the preferences data. These APIs view the data as a collection of dictionaries of key/value pairs and an associated path name. The root path ("/") identifies the top-level dictionary. Additional path components specify the keys for sub-dictionaries.

For example, the following dictionary can be accessed via two paths. The root ("/") path would return a dictionary with all keys and values. The path "/path1" would only return the dictionary with the "key3" and "key4" properties.


Each dictionary can also include the kSCResvLink key. The value associated with this key is interpreted as a "link" to another path. If this key is present, a call to the GetPathValue() API will return the dictionary specified by the link.
Subclass of the CFObjectMBS class.

Feedback, Comments & Corrections

Super class CFObjectMBS

This class has no sub classes.

Some examples which use this class:

The items on this page are in the following plugins: MBS MacCF Plugin.

SCNetworkReachabilityMBS   -   ScrollBar

MBS Xojo PDF Plugins