Permalink
Browse files

Bug fix: Various smaller fixes regarding GC, dot notation, etc...

  • Loading branch information...
1 parent 75e8a5b commit 380973bd9ada67021a18b25f0e34a2159185a4f2 @andreberg committed Oct 20, 2009
Showing with 20 additions and 20 deletions.
  1. +1 −0 NSString_RegEx.m
  2. +3 −4 PBCLIProxy.m
  3. +1 −1 PBGitWindowController.h
  4. +1 −1 PBGitWindowController.m
  5. +13 −11 PBQLOutlineView.m
  6. +0 −1 PBUnsortableTableHeader.h
  7. +1 −2 PBUnsortableTableHeader.m
View
@@ -85,6 +85,7 @@ - (NSArray *) substringsMatchingRegularExpression:(NSString *)pattern count:(int
if (pmatch)
free(pmatch);
regfree(&preg);
+ [[NSGarbageCollector defaultCollector] collectIfNeeded];
return outMatches;
}
View
@@ -20,12 +20,11 @@ @implementation PBCLIProxy
- (id)init
{
if (self = [super init]) {
- self.connection = [NSConnection new];
- [self.connection setRootObject:self];
+ connection = [NSConnection new];
+ [connection setRootObject:self];
- if ([self.connection registerName:ConnectionName] == NO)
+ if ([connection registerName:ConnectionName] == NO)
NSBeep();
-
}
return self;
}
View
@@ -10,7 +10,7 @@
#import "PBGitRepository.h"
@class PBViewController;
-@interface PBGitWindowController : NSWindowController {
+@interface PBGitWindowController : NSWindowController <NSWindowDelegate> {
__weak PBGitRepository* repository;
int selectedViewIndex;
IBOutlet NSView* contentView;
View
@@ -153,7 +153,7 @@ - (void) useToolbar:(NSToolbar *)toolbar
[item bind:@"selectedIndex" toObject:self withKeyPath:@"selectedViewIndex" options:0];
[item setEnabled: ![repository isBareRepository]];
- [self.window setToolbar:toolbar];
+ [[self window] setToolbar:toolbar];
}
@end
View
@@ -71,24 +71,26 @@ - (NSMenu *)menuForEvent:(NSEvent *)theEvent
// figure out if the row that was just clicked on is currently selected
if ([selectedRowIndexes containsIndex:row] == NO)
- [self selectRow:row byExtendingSelection:NO];
+ [self selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
}
return [controller contextMenuForTreeView];
}
/* Implemented to satisfy datasourcee protocol */
-- (BOOL) outlineView: (NSOutlineView *)ov
- isItemExpandable: (id)item { return YES; }
+- (BOOL) outlineView:(NSOutlineView *)ov isItemExpandable:(id)item {
+ return YES;
+}
-- (NSInteger) outlineView: (NSOutlineView *)ov
- numberOfChildrenOfItem:(id)item { return 0; }
+- (NSInteger) outlineView:(NSOutlineView *)ov numberOfChildrenOfItem:(id)item {
+ return 0;
+}
-- (id) outlineView: (NSOutlineView *)ov
- child:(NSInteger)index
- ofItem:(id)item { return nil; }
+- (id) outlineView:(NSOutlineView *)ov child:(NSInteger)index ofItem:(id)item {
+ return nil;
+}
-- (id) outlineView: (NSOutlineView *)ov
- objectValueForTableColumn:(NSTableColumn*)col
- byItem:(id)item { return nil; }
+- (id) outlineView:(NSOutlineView *)ov objectValueForTableColumn:(NSTableColumn *)col byItem:(id)item {
+ return nil;
+}
@end
@@ -8,7 +8,6 @@
#import <Cocoa/Cocoa.h>
-
@interface PBUnsortableTableHeader : NSTableHeaderView {
IBOutlet NSArrayController *controller;
int clickCount;
@@ -8,7 +8,6 @@
#import "PBUnsortableTableHeader.h"
-
@implementation PBUnsortableTableHeader
- (void)mouseDown:(NSEvent *)theEvent
@@ -30,7 +29,7 @@ - (void)mouseDown:(NSEvent *)theEvent
if (++clickCount == 3)
{
clickCount = 0;
- controller.sortDescriptors = [NSArray array];
+ [controller setSortDescriptors:[NSArray array]];
[controller rearrangeObjects];
return;
}

0 comments on commit 380973b

Please sign in to comment.