From 9ff5c4cb39991057c6be715cb43481b9aa738a52 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 9 Jul 2008 13:27:06 -0400 Subject: [PATCH] Setting the default values for NSUserDefaults * Source/AppDelegate.m: (initialize): Register the default preferences dict --- Source/AppDelegate.m | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/AppDelegate.m b/Source/AppDelegate.m index 64f98e4..9b684c0 100644 --- a/Source/AppDelegate.m +++ b/Source/AppDelegate.m @@ -27,11 +27,23 @@ { if (self = [super init]) { - } return self; } +/** + * Initialize method that is called before all other messages. This will set the default + * preference values. + */ ++ (void)initialize +{ + NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithInt:9000], @"Port", @"macgdbp", @"IDEKey", nil]; + + [[NSUserDefaults standardUserDefaults] registerDefaults:dict]; + + [dict release]; +} + /** * When the application has finished loading, show the connection dialog */ -- 2.43.5