Defaults occasionally get confused
Defaults occasionally get confused
- Subject: Defaults occasionally get confused
- From: Gabriel Zachmann <email@hidden>
- Date: Fri, 23 Sep 2016 00:26:21 +0200
I have a funny problem with the defaults of my screensaver.
Let me try to explain:
I read/write from/to the defaults like this:
defaults_ = [[ScreenSaverDefaults defaultsForModuleWithName: @"de.zach"] retain];
[defaults_ registerDefaults: appDefaults];
[defaults_ synchronize];
fontSize_ = [defaults_ integerForKey: @"FontSize"];
Later, when the user has modified some default values, I write to the default file like so:
[defaults_ setInteger: fontSize_ forKey: @"FontSize"];
[defaults_ synchronize];
This creates a file de.zach.855E4C13-F312-5D3A-BCA7-BDFFC2C65E42.plist
Now, occasionally, a new defaults file appears with a different ID (the long number at the end of the file name).
I never created that ID, but it makes my screensaver "forget" the original defaults.
Any ideas why this happens will be appreciated.
Best regards,
Gabriel.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden