-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Drop CoreData+JRExtensions.m for modern mogenerator template (also move from newInManagedObjectContext: to insertInManagedObjectContext:). * Adopt Xmo'd support. * Copy NSTableView+CocoaBindingsDeleteKey.m into the project folder with the jump from rentzsch.com/svn to github. * Jump to the 10.5 SDK.
- Loading branch information
Showing
9 changed files
with
130 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface NSTableViewPlusCocoaBindingsDeleteKey : NSTableView {} | ||
@end | ||
@implementation NSTableViewPlusCocoaBindingsDeleteKey | ||
+ (void)load { | ||
[NSTableViewPlusCocoaBindingsDeleteKey poseAsClass:[NSTableView class]]; | ||
} | ||
|
||
- (void)keyDown:(NSEvent*)event_ { | ||
NSString *eventCharacters = [event_ characters]; | ||
if ([eventCharacters length]) { | ||
switch ([eventCharacters characterAtIndex:0]) { | ||
case NSDeleteFunctionKey: | ||
case NSDeleteCharFunctionKey: | ||
case NSDeleteCharacter: { | ||
NSArray *columns = [self tableColumns]; | ||
unsigned columnIndex = 0, columnCount = [columns count]; | ||
NSDictionary *valueBindingDict = nil; | ||
for (; !valueBindingDict && columnIndex < columnCount; ++columnIndex) { | ||
valueBindingDict = [[columns objectAtIndex:columnIndex] infoForBinding:@"value"]; | ||
} | ||
if (valueBindingDict && [[valueBindingDict objectForKey:@"NSObservedObject"] isKindOfClass:[NSArrayController class]]) { | ||
// Found a column bound to an array controller. | ||
[[valueBindingDict objectForKey:@"NSObservedObject"] remove:self]; | ||
} else { | ||
[super keyDown:event_]; | ||
} | ||
} break; | ||
default: | ||
[super keyDown:event_]; | ||
break; | ||
} | ||
} | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.