Fixed CPDocumentController missing method currentDocument

In this commit I've added the currentDocument method to the document controller

Also removed the firstEligibleExistingWindowController method from CPDocument
It did nothing but add confusion as it was not used anywhere else in the frameworks.
And it is not in cocoa.
This commit is contained in:
Blair Duncan committed 2013-03-21 10:38:06 -04:00
1 parent 6f57b8a2de
commit 3178f0b57d
2 files changed
+19 -20

No files matched your search

+8
View File
@@ -253,6 +253,14 @@ var CPSharedDocumentController = nil;
return _documents;
}
/*!
Returns the CPDocument object associated with the main window.
*/
- (CPDocument)currentDocument
{
return [[[CPApp mainWindow] windowController] document];
}
/*!
Adds \c aDocument under the control of the receiver.
@param aDocument the document to add