I've run into some trouble using revert with NSUserDefaultsController:
It doesn't work. My settings do not revert to their previous settings. I'm
working on a prefs window and what I want to have happen is if a user clicks
the cancel button, any changes made are reverted to their previous setting.
I have programmatically set [[NSUserdefaultsController
sharedUserDefaultsController] setAppliesImmediately:NO]. My understanding
was that this was required for revert to work. I found a post at
cocoabuilder that said using this pair of messages would work to revert
settings:

dictionaryWithValuesForKeys (to get the current state of the user prefs)
setValuesForKeysWithDictionary (to restore the user prefs)

This actually works for me and I'm OK with this as a solution, but I'd still
like to know how revert should work. There are a number of posts about
revert at cocoabuilder. Many people seem to have issues with it, so it's use
does not appear to be as straightforward as implied by the docs.
Thanks


-- 
"My break-dancing days are over, but there's always the funky chicken"
--The Full Monty
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to