Be more lenient in documents about strings versus URLs.

Fix a typo in CPTextField.
This commit is contained in:
Ross Boucher
2010-12-16 17:22:32 -08:00
parent 42db55fabd
commit 68a15c5c7c
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -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];
}