Super class: CFObjectMBS
|class||SystemConfiguration||MBS MacCF Plugin||4.2||Yes||No||No||All|
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.
- 2 shared properties
- 20 methods
- method AddValue(key as CFStringMBS, value as CFObjectMBS) as boolean
- method ApplyChanges as boolean
- method CommitChanges as boolean
- method Create(name as CFStringMBS, prefid as CFStringMBS) as boolean
- method CreateUniquePathChild(prefix as CFStringMBS) as CFStringMBS
- method CreateWithAuthorization(name as CFStringMBS, prefid as CFStringMBS, AuthorizationHandle as Integer) as boolean
- method GetPathLink(path as CFStringMBS) as CFObjectMBS
- method GetPathValue(path as CFStringMBS) as CFDictionaryMBS
- method GetValue(key as CFStringMBS) as CFObjectMBS
- method KeyList as CFArrayMBS
- method Lock(wait as boolean) as boolean
- method RemovePathValue(path as CFStringMBS) as boolean
- method RemoveValue(key as CFStringMBS) as boolean
- method SetComputerName(name as CFStringMBS) as boolean
- method SetLocalHostName(name as CFStringMBS) as boolean
- method SetPathLink(path as CFStringMBS, link as CFObjectMBS) as boolean
- method SetPathValue(path as CFStringMBS, value as CFDictionaryMBS) as boolean
- method SetValue(key as CFStringMBS, value as CFObjectMBS) as boolean
- method Signature as CFBinaryDataMBS
- method Unlock as boolean
- shared method ErrorString(errorcode as Integer) as string
Super class CFObjectMBS
- 5 properties
- 9 methods
- shared method NewCFObject(handle as Integer) as CFObjectMBS
This class has no sub classes.
Some examples using this class:
- /MacCF/SystemConfiguration/Preferences Test
The items on this page are in the following plugins: MBS MacCF Plugin.
MBS Xojo blog