Created
April 6, 2011 09:54
-
-
Save mikeabdullah/905412 to your computer and use it in GitHub Desktop.
How to fake removing a recent document URL. Note, uses -ks_isEqualToURL: method from KSFileUtilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)clearRecentDocumentURL:(NSURL *)url; | |
{ | |
NSArray *recentDocs = [self recentDocumentURLs]; | |
[self clearRecentDocuments:self]; | |
// Must enumerate backwards to register in the correct order | |
for (NSURL *aURL in [recentDocs reverseObjectEnumerator]) | |
{ | |
if (![aURL ks_isEqualToURL:url]) | |
{ | |
[self noteNewRecentDocumentURL:aURL]; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment