diff --git a/AppKit/CPDocumentController.j b/AppKit/CPDocumentController.j index 481d5fe82..ef576a404 100644 --- a/AppKit/CPDocumentController.j +++ b/AppKit/CPDocumentController.j @@ -390,13 +390,14 @@ var CPSharedDocumentController = nil; - (void)noteNewRecentDocument:(CPDocument)aDocument { - [self noteNewRecentDocumentURL:[[aDocument fileURL] absoluteString]]; + [self noteNewRecentDocumentURL:[aDocument fileURL]]; } -- (void)noteNewRecentDocumentURL:(CPString)aURL +- (void)noteNewRecentDocumentURL:(CPURL)aURL { + var urlAsString = [aURL isKindOfClass:CPString] ? aURL : [aURL absoluteString]; if (typeof window["cpNoteNewRecentDocumentPath"] === 'function') - window.cpNoteNewRecentDocumentPath(aURL); + window.cpNoteNewRecentDocumentPath(urlAsString); [self _updateRecentDocumentsMenu]; } diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j index 8a5d1e066..d5609f26b 100644 --- a/AppKit/CPTextField.j +++ b/AppKit/CPTextField.j @@ -977,7 +977,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); // fall through to the return } - return CGMakeRange(0, 0); + return CPMakeRange(0, 0); } - (void)setSelectedRange:(CPRange)aRange