failed attempts to intercept copy command when the cursor is in the empty text field... master
Marc Liyanage [Sun, 5 Apr 2009 15:43:44 +0000 (17:43 +0200)]
Sources/MyDocument.m
calc/libcalc.a
calc/libcustcalc.a

index a273168..514b3ed 100644 (file)
 
 
 - (void)awakeFromNib {
-
        if (![self fileName]) {
                [arrayController add:self];
        }
-       
        [arrayController setSelectionIndex:[calculations count] - 1];
-
 }
 
 
        return selectedObject && ![self lastItemIsSelected] && ![selectedObject expressionIsEmpty];
 }
 
+/*
+- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector {
+       NSLog(@"text view by selector %d", aSelector);
+       return NO;
+}
+*/
+
 
 - (IBAction)copy:(id)sender {
        NSPasteboard *pboard = [NSPasteboard generalPasteboard];
 }
 
 
-
-
 - (NSString *)windowNibName {
     return @"MyDocument";
 }
index 9e11863..5a0191f 100644 (file)
Binary files a/calc/libcalc.a and b/calc/libcalc.a differ
index cb812d3..6ee9b1d 100644 (file)
Binary files a/calc/libcustcalc.a and b/calc/libcustcalc.a differ