Where do you save preferences?
richmondmathewson at gmail.com
Tue Jun 19 03:13:16 EDT 2012
On 19/06/12 09:45, Peter Haworth wrote:
Personally I would save any preferences from a Macintosh standalone inside
the application bundle:
1. If you do an OS upgrade and Apple "play silly bu**ers" with how they
your preferences don't get lost track of.
2. If, like me, you have a Mac at home and a Mac at work, you can take
on a flash drive, between machines with preferences going along for
(Admittedly, between my macMini PPC and my G3 iMac, both running Mac
OS 10.4 I cannot
exactly be described as "up to date" with the latest foibles of the
If Apple have got to the stage where they are enforcing a policy of
where one has
to store preferences so rigidly that you have no choice that's another
and it should result in vast protests from the world wide Mac developer
but probably won't as most of them are:
letting the "great powers" steamroller them into compliance.
> I believe the class/API Richard refers to simply write the data they are
> given to a file in the prefs folder that Apple wants you to use. If you
> give bad data to them, they will foul up the prefs file just as badly as
> writing the same bad data directly from LC would foul it up.
> I thnk Apple wants you to use the class/API so when they change their mind
> again about where preferences should be, you'll be protected from that
> While I'm not familiar with the API, I would guess that it wants to
> maintain the prefs file in plist format. My prefs file isn't in plist
> format and I don't want it to be so I can't use the API. Unless of course
> Apple decides to invalidate my app because it doesn't use plist format…...
> However, I do agree that if you are writing an app that accesses one of
> Apple's application's prefs file, then you'd better make sure it does it
> correctly. But once again, the API is just as capable of writing bad data
> to the prefs file as LC is.
> I've posted to the Apple Developer Forum about this issue and have had a
> couple of replies but still nothing definitive.
> lcSQL Software <http://www.lcsql.com>
> On Mon, Jun 18, 2012 at 8:22 PM, Kay C Lan <lan.kc.macmail at gmail.com> wrote:
>>> What's new is that your app doesn't "write" there per se. Apple is now
>>> requiring that the OS write there on your behalf, using either the
>>> theNSUserDefaults Cocoa class or the CFPreferences API.
>>> At face value this seems silly, since of course being able to write a
>>> to a given location isn't exactly rocket science truly requiring OS-level
>>> Maybe, maybe not. From my observance of the Apple Forums I would say well
>> over 90% of the advise given whenever OS X or an app starts misbehaving is:
>> Start Disk Utility and 'Repair Disk Permissions'* and Trash the app
>> Preference file.
>> I've seen similar advise given on this List. As it clearly works, it would
>> suggest that for whatever reason, Preference files are regularly not
>> written correctly or are written in a way which corrupts other app
>> Preference files.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode