On Mar 28, 2008, at 11:27 AM, Lincoln Green wrote:
I followed your suggestion, and it worked great! However, when I delete the preferences file form /Library/Preferences/, my application won't put up a window. Any suggestions to get around this?

Check the console window in Xcode and then start debugging.

Of course I didn't post all my code, so you may have failed to initialize NSUserDefaults yourself. Here is what I have in my app controller:

// Early set up
+ (void)initialize
{
        // Set up initial defaults
NSDictionary *defaultValues = [NSDictionary dictionaryWithObjectsAndKeys: [NSArchiver archivedDataWithRootObject:[NSColor whiteColor]], @"browserBackgroundColor",
                [NSNumber numberWithInteger:1], PrefsVersion,
                 [NSNumber numberWithInteger:1], AppVersion,
                 nil];
        
// Set up default values for preferences managed by NSUserDefaultsController [[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];



_______________________________________________

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/bagelturf%40mac.com

This email sent to [EMAIL PROTECTED]

--
Blog:  http://www.bagelturf.com/   Photos: http://bagelturf.smugmug.com/




_______________________________________________

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