NSUserDefaultsController problems
NSUserDefaultsController problems
- Subject: NSUserDefaultsController problems
- From: Doug Steigerwald <email@hidden>
- Date: Fri, 30 Jul 2004 16:09:50 -0400
I've been working on a part of an app that I'm writing to revert all
the bindings values in the app to initialValues when I hit cancel on a
custom sheet. The changed values go back to their initial values, but
when I quit the application, the plist is deleted. Below is basically
all that I have for my cancelSheet action. setInitialValues is
executed elsewhere in the app.
Is there something I should add to make sure that the plist isn't
deleted when the application is quit? If I NSLog initialValues it
prints out all the correct values, but when the app quits, the values
are lost along with the plist. I've tried to use
NSUserDefaultsController save method, and NSUserDefaults
registerDefaults method to see if that would work for me, but it's not.
- (IBAction)cancelSheet:(id)sender
{
[[NSUserDefaultsController sharedUserDefaultsController]
revertToInitialValues:sender];
[NSApp endSheet:pSheet];
}
Any help would be great.
Thanks,
Doug Steigerwald
_______________________________________________
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.