Changeset 151
- Timestamp:
- 04/21/08 11:37:15 (4 weeks ago)
- Files:
-
- trunk/SUUserDefaults.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/SUUserDefaults.m
r105 r151 54 54 CFPreferencesSetValue((CFStringRef)defaultName, value, (CFStringRef)identifier, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 55 55 CFPreferencesSynchronize((CFStringRef)identifier, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 56 // If anything's bound to this through an NSUserDefaultsController, it won't know that anything's changed. 57 // We can't get an NSUserDefaults object for anything other than the standard one for the app, so this won't work for bundles. 58 // But it's the best we can do: this will make NSUserDefaultsControllers know about the changes that have been made. 59 [[NSUserDefaults standardUserDefaults] synchronize]; 56 60 } 57 61 … … 76 80 CFPreferencesSetValue((CFStringRef)defaultName, (CFBooleanRef)[NSNumber numberWithBool:value], (CFStringRef)identifier, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 77 81 CFPreferencesSynchronize((CFStringRef)identifier, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 82 // If anything's bound to this through an NSUserDefaultsController, it won't know that anything's changed. 83 // We can't get an NSUserDefaults object for anything other than the standard one for the app, so this won't work for bundles. 84 // But it's the best we can do: this will make NSUserDefaultsControllers know about the changes that have been made. 85 [[NSUserDefaults standardUserDefaults] synchronize]; 78 86 } 79 87