• 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: Forcing NSUserDefaults being written to disk?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forcing NSUserDefaults being written to disk?


  • Subject: Re: Forcing NSUserDefaults being written to disk?
  • From: Pierre-Olivier Latour <email@hidden>
  • Date: Thu, 09 Jan 2003 11:25:25 -0800

>> + (void) initialize
>> {
>> NSMutableDictionary* defaults = [NSMutableDictionary
>> dictionary];
>> [defaults setInt:640 forKey:kKey_ScreenWidth];
>> [defaults setInt:480 forKey:kKey_ScreenHeight];
>> [defaults setInt:32 forKey:kKey_ScreenDepth];
>> [defaults setInt:16 forKey:kKey_ZDepth];
>> [defaults setBool:YES forKey:kKey_VerticalSync];
>> [defaults setInt:0 forKey:kKey_MaxFPS];
>> [defaults setBool:YES forKey:kKey_LogFile];
>> [defaults setInt:8765 forKey:kKey_ServerPort];
>> [defaults setBool:NO forKey:kKey_HighPriorityThread];
>> [[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
>> }
>
> NSMutableDictionary does not respond to setInt: or setBool:. Those are
> messages that were only recently added to NSUserDefaults, not
> NSMutableDictionary.

Yes, it does, since I added a custom category for that ;)

> BTW synchronize is called automatically in NSDocument apps.

Yes, but in my case it is not an NSDocument app, just a basic cocoa app.


_____________________________________________________________

Pierre-Olivier Latour email@hidden
Palo Alto, USA http://www.pol-online.net
_______________________________________________
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.

References: 
 >Re: Forcing NSUserDefaults being written to disk? (From: Alex Rice <email@hidden>)

  • Prev by Date: Re: Non-activating panel not working
  • Next by Date: Re: Forcing NSUserDefaults being written to disk?
  • Previous by thread: Re: Forcing NSUserDefaults being written to disk?
  • Next by thread: Re: Forcing NSUserDefaults being written to disk?
  • Index(es):
    • Date
    • Thread