From: Marc Liyanage Date: Sun, 5 Apr 2009 15:43:44 +0000 (+0200) Subject: failed attempts to intercept copy command when the cursor is in the empty text field... X-Git-Url: http://www.entropy.ch/git/LeanCalc.git/commitdiff_plain/HEAD failed attempts to intercept copy command when the cursor is in the empty text field of the final result line --- diff --git a/Sources/MyDocument.m b/Sources/MyDocument.m index a273168..514b3ed 100644 --- a/Sources/MyDocument.m +++ b/Sources/MyDocument.m @@ -34,13 +34,10 @@ - (void)awakeFromNib { - if (![self fileName]) { [arrayController add:self]; } - [arrayController setSelectionIndex:[calculations count] - 1]; - } @@ -99,6 +96,13 @@ 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]; @@ -108,8 +112,6 @@ } - - - (NSString *)windowNibName { return @"MyDocument"; } diff --git a/calc/libcalc.a b/calc/libcalc.a index 9e11863..5a0191f 100644 Binary files a/calc/libcalc.a and b/calc/libcalc.a differ diff --git a/calc/libcustcalc.a b/calc/libcustcalc.a index cb812d3..6ee9b1d 100644 Binary files a/calc/libcustcalc.a and b/calc/libcustcalc.a differ