• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: All of a sudden NSUserDefaults stopped working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >All of a sudden NSUserDefaults stopped working (From: Mark Williams <email@hidden>)

  • Prev by Date: How To Name My Folder in Application Support?
  • Next by Date: Re: How do you hide/show a window via bindings?
  • Previous by thread: All of a sudden NSUserDefaults stopped working
  • Next by thread: Cocoa app fails when using 10.4 Universal SDK
  • Index(es):
    • Date
    • Thread