Re: All of a sudden NSUserDefaults stopped working
Re: All of a sudden NSUserDefaults stopped working
- Subject: Re: All of a sudden NSUserDefaults stopped working
- From: Jerry Krinock <email@hidden>
- Date: Tue, 07 Jun 2005 20:19:27 -0700
on 05/06/07 19:30, Mark Williams at email@hidden wrote:
> Since switching to tiger suddenly my application or one of them any
> way, cannot write preferences.
> I am using something very simple:
> NSUserDefaults * settings = [NSUserDefaults standardUserDefaults];
>
> [settings setObject:[cd stringValue] forKey:@"Registration"];
>
> Other preferences will set ok. But I cannot make this one set for
> some reason. Any one have any ideas as to why it might be selective?
Well, I have seen simple things like this fail about 147 times in the last
year. And all 147 times it turned out to be some really stupid and
near-obvious mistake on my part. Probably you're smarter than me, but make
sure that [cd stringValue] is returning a good NSString*, and also make sure
that you are sending:
[settings synchronize] ;
soon after that, which writes all pending defaults changes to the hard disk.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden