- -[NSApplication targetForAction:] will ask the shared document controller after the application delegate, this enabled File -> New and Open ... to enable and work in a document based app.

This commit is contained in:
Christopher Lloyd 2008-06-02 16:12:28 +00:00
parent 5d0704eb45
commit 40c4ca01e3

View File

@ -569,6 +569,9 @@ id NSApp=nil;
if([[self delegate] respondsToSelector:action])
return [self delegate];
if([[NSDocumentController sharedDocumentController] respondsToSelector:action])
return [NSDocumentController sharedDocumentController];
return nil;
}