Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created April 6, 2011 09:54
Show Gist options
  • Save mikeabdullah/905412 to your computer and use it in GitHub Desktop.
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
- (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