[Pythonmac-SIG] MOSX prefs -- again

Bob Savage savageb@pacbell.net
Tue, 30 May 2000 15:03:11 -0700


'Lo all,

I was perusing the MacOS-X docs online and I came across this: *

> CFPreferences
> 
> We have added new API to CFPreferences to support framework and suite
> developers. First, we have added the constant
> kCFPreferencesCurrentApplication; frameworks can pass this constant in place
> of the application's name to retrieve preferences for the currently running
> application. 
> 
> Secondly, we have made it possible for suites and frameworks to add their
> preferences to an application's preferences. To add your suite preferences,
> call CFPreferencesAddSuitePreferencesToApp(), passing the application's name
> (or kCFPreferencesCurrentApplication for the currently running application)
> and the name of your suite preferences. You can later remove your preferences
> by calling CFPreferencesRemoveSuitePreferencesFromApp() if you wish. Finally,
> set preferences for your suite by calling CFPreferencesSetValue(), passing
> your suite's name in place of the application name. The user name and host
> name arguments are as for applications; typically, you will pass a user name
> of kCFPreferencesCurrentUser and a host name of kCFPreferencesAnyHost.


CF refers to Core Foundation which is a part of Core Services -- the layer
resting directly on top of the Kernel, and is well beneath both the "Cocoa"
and "Carbon" layers. I believe, therefore, that it is available to both API
sets, or perhaps more acurately it is implemented in them both, invoking
CFPreferencesSetValue or whatever is appropriate.

(BTW, I like that "Host" bit! Sounds great in a computer lab environment)

Bob

* Source:

<http://developer.apple.com/techpubs/macosx/System/Documentation/Developer/R
eleaseNotes/CoreFoundation.html>

----
"The obvious road is almost always a fool's road." - W.S. Burroughs