Remove all references of the window controller from GDBpConnection
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 1 Dec 2008 15:17:12 +0000 (10:17 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 1 Dec 2008 15:17:12 +0000 (10:17 -0500)
* Source/GDBpConnection.h: Removed the windowController ivar and prop
* Source/GDBpConnection.m:
(initWithWindowController:port:session): Renamed to -[initWithPort:session:]
(dealloc): No more windowController
(socketDidAccept:): Change a -[refreshStatus] to an -[updateStatus]
(reconnect): Don't make a call on windowController
* Source/DebuggerController.m:
(init): Use the updated init method for GDBpConnection

Source/DebuggerController.m
Source/GDBpConnection.h
Source/GDBpConnection.m

index a8c5dedcc1d1da27881a18cfe316ef59a4bbb841..b3be45e97ab5bba42e841f5808ffa36d62dbd913 100644 (file)
@@ -40,9 +40,7 @@
                stackController = [[StackController alloc] init];
                
                NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-               connection = [[GDBpConnection alloc] initWithWindowController:self
-                                                                                                                                        port:[defaults integerForKey:@"Port"]
-                                                                                                                                 session:[defaults stringForKey:@"IDEKey"]];
+               connection = [[GDBpConnection alloc] initWithPort:[defaults integerForKey:@"Port"] session:[defaults stringForKey:@"IDEKey"]];
                expandedRegisters = [[NSMutableSet alloc] init];
                [[self window] makeKeyAndOrderFront:nil];
                [[self window] setDelegate:self];
index c5ec8e88e2ecf7477da802a0bc19c022747d6f4d..09f270ff6ee18c39e9bc124a70abfa6d05175525 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #import <Cocoa/Cocoa.h>
-#import "DebuggerController.h"
 #import "SocketWrapper.h"
 #import "Breakpoint.h"
 #import "StackFrame.h"
@@ -33,17 +32,14 @@ extern NSString *kErrorOccurredNotif;
         */
        NSString *status;
        
-       DebuggerController *windowController;
-       
        SocketWrapper *socket;
 }
 
 @property(readonly, copy) NSString *status;
 @property(readonly) SocketWrapper *socket;
-@property(readonly) DebuggerController *windowController;
 
 // initializer
-- (id)initWithWindowController:(DebuggerController *)wc port:(int)aPort session:(NSString *)aSession;
+- (id)initWithPort:(int)aPort session:(NSString *)aSession;
 
 // getter
 - (int)port;
index 346285ca680357f71e2c9ba4f6c7f8a05e19bce7..c06f6f8cd34da06b63a8080ff869509078df6ad7 100644 (file)
@@ -30,13 +30,13 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification";
 
 @implementation GDBpConnection
 
-@synthesize socket, windowController, status;
+@synthesize socket, status;
 
 /**
  * Creates a new DebuggerConnection and initializes the socket from the given connection
  * paramters.
  */
-- (id)initWithWindowController:(DebuggerController *)wc port:(int)aPort session:(NSString *)aSession;
+- (id)initWithPort:(int)aPort session:(NSString *)aSession;
 {
        if (self = [super init])
        {
@@ -44,8 +44,6 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification";
                session = [aSession retain];
                connected = NO;
                
-               windowController = [wc retain];
-               
                // now that we have our host information, open the socket
                socket = [[SocketWrapper alloc] initWithConnection:self];
                [socket setDelegate:self];
@@ -63,7 +61,6 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification";
 {
        [socket release];
        [session release];
-       [windowController release];
        [super dealloc];
 }
 
@@ -112,7 +109,7 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification";
 {
        connected = YES;
        [socket receive];
-       [self refreshStatus];
+       [self updateStatus];
        
        // register any breakpoints that exist offline
        for (Breakpoint *bp in [[BreakpointManager sharedManager] breakpoints])
@@ -144,7 +141,6 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification";
 {
        [socket close];
        self.status = @"Connecting";
-       [windowController resetDisplays];
        [socket connect];
 }