• 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
What writes out a pref file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What writes out a pref file?


  • Subject: What writes out a pref file?
  • From: Mark Dawson <email@hidden>
  • Date: Thu, 14 Apr 2005 15:01:28 -0700

I added the following code to my +initialize method for my appController:

NSMutableDictionary *dict;
NSUserDefaults *defaults;

defaults=[NSUserDefaults standardUserDefaults];

dict=[NSMutableDictionary dictionary];

[dict setObject:[defaults objectForKey:@"AppleMeasurementUnits"] forKey:@"MyMeasurements"]; // starts out the same as AppleMeasurementUnits

[defaults registerDefaults:dict];

However, I don't see the above key in my "com.appName.plist" file in my ~/Library/Preferences/ folder (the last mod date is yesterday). What do I need to do to write out new values? From what I could tell, launching and quitting should write it out, right? Or do I need to call something like synchronize?
 _______________________________________________
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

  • Follow-Ups:
    • Re: What writes out a pref file?
      • From: Dan Yocom <email@hidden>
    • Re: What writes out a pref file?
      • From: Jim Correia <email@hidden>
  • Prev by Date: Re: Sound Input Meter (Or, getting amplitude of input stream)
  • Next by Date: Re: What writes out a pref file?
  • Previous by thread: Re: Self terminating popup window - need help
  • Next by thread: Re: What writes out a pref file?
  • Index(es):
    • Date
    • Thread