focus expression text field at startup -> version 1.2
[LeanCalc.git] / Sources / MyDocument.m
index 76f6e6c..519ffe0 100644 (file)
        }
        
        [arrayController setSelectionIndex:[calculations count] - 1];
+
 }
 
 
+
 - (IBAction)commit:(id)sender {
 
        if (![[sender stringValue] length]) return;
 }
 
 
-- (void)windowControllerDidLoadNib:(NSWindowController *) aController {
+- (void)windowControllerDidLoadNib:(NSWindowController *)aController {
+       NSWindow *win = [aController window];
+       [win performSelector:@selector(makeFirstResponder:) withObject:expressionField afterDelay:0.0];
     [super windowControllerDidLoadNib:aController];
 }