In article <bov8fm$1u2$matavnet.hu>, "Greg X" <com> wrote:
You should keep in mind that there is no such thing as MDI vs. SDI on the Mac.
The reason you can't put it inside the app is that you can't assume you have the
privileges to modify yourself.
You need to decide whether this file contains:
b. application support resources
A preferences file is something that I would feel sad about losing, because it
contains some configuration that I went through a lot of work to create. A
support file is something that belongs to the application and if I throw it out,
the app will recreate it, or I will have to reinstall the app.
You also need to decide whether this is
a. a per-user file
b. system-wide file
It's a per-user file if it makes sense for different users to have different
versions of this file. (Don't forget that multiple users can be logged in at
Finally, you need to decide whether you want to use
a. a proprietary file format
b. a Mac OS X API
to store the data. If you already have your own file format and a pr for it,
then it's probabyl easier to use the same format on Mac OS X. If you are using a
windows API to maintain the file, then you are probably better off using a
similar Mac OS X API to maintain the file.
If you decide to maintain the file yourself:
User preferences live in the location returned by FSFindFolder(kUserDomain,
User application support items live in the location returned by
Global preferences live in the location returned by FSFindFolder(kLocalDomain,
Global application support items live in the location returned by
If you decide to use Mac OS X APIs to maintain the data, you want to look into
the CFPrerences API. If you are setting per-user preferences, use
kCFPreferencesCurrentUser, otherwise use kCFPreferencesAnyUser.
Note that there is no API that covers application support items -- this is
because application support items are considered to be completely managed by the
application itself. Therefore, if you decide that your data belongs in
application support (which I don't think is right because on the little you've
said so far), you have to take care of reading and writing the file yourself.
If you maintain the file yourself, I recommend you name it with the
com.company.product convention (see /Library/Preferences for examples).
If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>