Re: Mysterious Preferences File Again
Re: Mysterious Preferences File Again
- Subject: Re: Mysterious Preferences File Again
- From: Matt Deatherage <email@hidden>
- Date: Fri, 12 May 2006 21:36:02 -0500
On 5/12/06 at 6:45 PM, Luther Fuller <email@hidden> wrote:
> What is writing this stuff without my permission? How can I prevent
> its being written? Is there a bug here?
This has come up before, but I'm not sure if it was on this list or not.
The system can write keys to a property list file for your bundle
identifier, but it uses the proper system routines to do so. In other
words, it only adds keys to your property list file, and it uses
Apple-named keys that should not conflict with anything already in your
property list file.
The problem is that you're trying to use your _property list_ file as a
_preferences_ file. If you were using code that eventually called
through to CFPreferences to merely add, read, write, or delete keys from
a true XML property list, the existence of other keys in the file would
not interfere.
But I'm guessing that you're writing something completely different to a
file that the system expects, if it exists, to be a valid _property
list_ file. The system then writes property list content to it,
interfering with your use.
If you want to create a file in the preferences folder that's named
"yourbundlename.plist", it needs to be a real property list file. If
it's not a real property list file, name it something else.
(I base this upon a belief, from I know not where, that if the system
finds your preferences file to be in the wrong format or otherwise
"damaged," that it will erase it and create a new one when asked to
store any preferences in it. If you are using XML preferences and are
absolutely sure they pass plist syntax-checking standards, then the
above-described is not causing your problem.)
--Matt
--
Matt Deatherage <email@hidden>
GCSF, Incorporated <http://www.macjournals.com>
"Unix geeks are the Amish of the computer world." -- Jens Alfke
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden