FROM : ssudre2
DATE : Fri Nov 29 22:43:37 2002
On vendredi, novembre 29, 2002, at 10:15 PM, Rob Frohne wrote:
> Hi All,
>
> I'm having trouble with my application crashing when there has been a
> Preferences file created. In trying to understand how things are
> working and how they are supposed to work, I find that the following
> code doesn't create a Preferences file, even on quitting the
> application.
>
> #import "test.h"
>
>
> @implementation test
> + (void)initialize
> {
> //This doesn't seem to work.
> NSUserDefaults *defaults = [NSUserDefaults
> standardUserDefaults];
> NSMutableDictionary *appDefs = [NSMutableDictionary
> dictionary];
>
> [appDefs setObject:@"NO" forKey:@"First Setting"];
> [appDefs setObject:@"YES" forKey:@"Second Setting"];
> [appDefs setObject:@"SNR" forKey:@"Third Setting"];
>
> [defaults registerDefaults:appDefs];
> `
> }
[defaults synchronize]; // may be
> @end
Do you have a CFBundleIdentifier key set in your Info.plist?
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Fri Nov 29 22:43:37 2002
On vendredi, novembre 29, 2002, at 10:15 PM, Rob Frohne wrote:
> Hi All,
>
> I'm having trouble with my application crashing when there has been a
> Preferences file created. In trying to understand how things are
> working and how they are supposed to work, I find that the following
> code doesn't create a Preferences file, even on quitting the
> application.
>
> #import "test.h"
>
>
> @implementation test
> + (void)initialize
> {
> //This doesn't seem to work.
> NSUserDefaults *defaults = [NSUserDefaults
> standardUserDefaults];
> NSMutableDictionary *appDefs = [NSMutableDictionary
> dictionary];
>
> [appDefs setObject:@"NO" forKey:@"First Setting"];
> [appDefs setObject:@"YES" forKey:@"Second Setting"];
> [appDefs setObject:@"SNR" forKey:@"Third Setting"];
>
> [defaults registerDefaults:appDefs];
> `
> }
[defaults synchronize]; // may be
> @end
Do you have a CFBundleIdentifier key set in your Info.plist?
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Rob Frohne | Nov 29, 22:15 | |
| Jeff Disher | Nov 29, 22:26 | |
| ssudre2 | Nov 29, 22:43 | |
| Fritz Anderson | Nov 29, 22:53 |






Cocoa mail archive

