Re: User Default Problems
Re: User Default Problems
- Subject: Re: User Default Problems
- From: Shaun Wexler <email@hidden>
- Date: Sun, 6 Apr 2003 16:05:24 -0700
On Sunday, April 6, 2003, at 01:51 PM, Eric Czarny wrote:
I seem to be running into a rather frustrating problem in regards the
NSUserDefaults. In the plist file for my application there are
numerous values with the same key, and I don't know why each value
isn't being assigned to it's own specific key. It's rather hard to
explain, and I can't determine a reasonable explanation for the
problem. Here is an example... I start my application, it registers
its default preferences... I open the preference window and change
numerous values, let's say I change setting A and B, respectively... A
is set to YES and B to NO... I close my application and look at the
plist file, all is well. Now, if I go back and set both A and B to NO
and go back to the plist file I note that I now see two A's both set
to NO. I don't know what's causing the problem, maybe it's the method
in which I change the values. I added a unique tag to each UI
component in the preference window and use a switch statement in one
method to handle all the preference changes. Could this pose any
problem?
Best Regards,
Eric Czarny
I think it only affects Boolean keys. I believe the bug was introduced
in 10.2.3, as it seemed to work fine until that system update, or the
Dec 2002 Developer Tools update.
Just hit the "dump" button, and you can see the raw .plist format. If
you want to temporarily set integers instead of BOOL for the types, it
will display them correctly.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.