Re: noteNewRecentDocumentURL?
Re: noteNewRecentDocumentURL?
- Subject: Re: noteNewRecentDocumentURL?
- From: Jerry LeVan <email@hidden>
- Date: Tue, 20 Jul 2004 15:04:18 -0400
Never Mind, right after I sent the mail I remembered that the TextEdit
app was in the developer directory.... a little bit of search and
[[NSDocumentController sharedDocumentController]
noteNewRecentDocumentURL:[NSURL fileURLWithPath:aFileName]];
Works just fine and updates the Open Recent menu item :)
Thanks
Jerry
On Jul 20, 2004, at 2:48 PM, Jerry LeVan wrote:
I came on this a bit late and may have missed the solution...
I have a non document based app that could benefit from the
open recent menu...
The documentation for noteNewRecentDocumentURL:
*******************
- (void)noteNewRecentDocumentURL:(NSURL *)aURL
This method should be called by applications *not* based on NSDocument
when they open or save documents identified by aURL. NSDocument
automatically calls this method when appropriate for
NSDocument-based applications. Applications not based
on NSDocument must also implement the application:openFile:
method in the application delegate to handle requests
from the Open Recent menu command. You can override this
method in an NSDocument-based application to prevent
certain kinds of documents from getting into the list
(but you have to identify them by URL).
****************
The method is described *in* the NSDocumentController documentation
If you have a non document based app, what should the target be?
Is the documentation incorrect?
Do non document apps have to manually add items to the open recent
submenu? (I already have the application:openFile: method in my app).
Inquiring minds want to know :)
Jerry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.