X-Git-Url: http://www.entropy.ch/git/LeanCalc.git/blobdiff_plain/f5fbaceee4c5c117ef600df1362fa90333ed8bc9..a40810ee12af338eb59a3e9d3a180013c951e1fb:/Sources/MyDocument.m diff --git a/Sources/MyDocument.m b/Sources/MyDocument.m index 76f6e6c..519ffe0 100644 --- a/Sources/MyDocument.m +++ b/Sources/MyDocument.m @@ -40,9 +40,11 @@ } [arrayController setSelectionIndex:[calculations count] - 1]; + } + - (IBAction)commit:(id)sender { if (![[sender stringValue] length]) return; @@ -101,7 +103,9 @@ } -- (void)windowControllerDidLoadNib:(NSWindowController *) aController { +- (void)windowControllerDidLoadNib:(NSWindowController *)aController { + NSWindow *win = [aController window]; + [win performSelector:@selector(makeFirstResponder:) withObject:expressionField afterDelay:0.0]; [super windowControllerDidLoadNib:aController]; }