From f0775fe6ba3c30bc0d7ae596552a0816dabb8f6c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ciar=C3=A1n=20Walsh?= Date: Tue, 15 Jul 2008 08:40:07 +0100 Subject: [PATCH] =?utf8?q?Preferences=20should=20be=20set=20in=20+load=20r?= =?utf8?q?ather=20than=20+initialize,=20as=20we=20can=E2=80=99t=20rely=20o?= =?utf8?q?n=20AppDelegate=20receiving=20a=20message=20before=20any=20other?= =?utf8?q?=20objects=20(In=20this=20case,=20DebuggerController=20was=20bei?= =?utf8?q?ng=20created=20first,=20leading=20to=20sockets=20without=20the?= =?utf8?q?=20correct=20default=20port=20number).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * Source/AppDelegate.m: (initialize): Change to load --- Source/AppDelegate.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/AppDelegate.m b/Source/AppDelegate.m index ba1d1a0..50a4b18 100644 --- a/Source/AppDelegate.m +++ b/Source/AppDelegate.m @@ -35,13 +35,17 @@ * Initialize method that is called before all other messages. This will set the default * preference values. */ -+ (void)initialize ++ (void)load { + NSAutoreleasePool* pool = [NSAutoreleasePool new]; + NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithInt:9000], @"Port", @"macgdbp", @"IDEKey", nil]; [[NSUserDefaults standardUserDefaults] registerDefaults:dict]; - + [dict release]; + + [pool release]; } /** -- 2.43.5