On Nov 20, 2014, at 3:21 PM, Scott Ribe <[email protected]> wrote:
> Now that the system is doing so much caching of preferences, and simply > copying prefs files will not get the job done, is there any other way of > forcibly setting another app's preferences? (FYI, neither of the apps in > question is sandboxed.) > > The situation is that an app is accessing a database, tracking events, > managing a repository of files, and using AppleScript to drive MS Word to > produce certain output. Every once in a while, Word just resets some of its > prefs. Every once in a while, it corrupts its prefs. Every once in a while, > it wedges itself due to (probably) resource leaks. And so on. So periodically > (+ whenever it stops responding) I quit Word, copy preferences files from > cached copies I keep that are set the way I want, and relaunch it. > > So, any way to for certain replace prefs with a know good set previously > saved? You could use -[NSUserDefaults setPersistentDomain:forName:]. You could also use "defaults import <domain> <path to plist>". Regards, Ken _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
