The docs for NSUserDefaults have this to say regarding - [NSUserDefaults synchronize]:

"Because this method is automatically invoked at periodic intervals, use this method only if you cannot wait for the automatic synchronization (for example, if your application is about to exit)"

NSUserDefaults seems to be hooked into -[NSApplication terminate:], since I can store a value and immediately terminate the application and the value is stored to disk. NSUserDefaults does not have the same behavior when used with a Foundation tool, since there's no Foundation- provided runloop and indeed no Foundation-provided way to exit your application.

Will NSUserDefaults ever synchronize itself itself in an app without an NSApplication? If so, when and how? If not, the docs need to be ammended.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to