Re: Open Recent menu in non-doc app
Re: Open Recent menu in non-doc app
- Subject: Re: Open Recent menu in non-doc app
- From: Brian Webster <email@hidden>
- Date: Fri, 22 Mar 2002 08:56:05 -0600
On Thursday, March 21, 2002, at 06:12 PM, cocoa-dev-
email@hidden wrote:
The menu is populated properly by calling
[[NSDocumentController sharedDocumentController]
noteNewRecentDocumentURL: [NSURL fileURLWithPath:path] ];
as soon as path is available.
If I try to use the Open Recent menu I get the following error panel
The recent document "EiffelTower_even_smaller.tif" in folder
"/Users/jnesto02/Smaller samples" failed to open.
The menu is being populated properly, but the items that get put
in the menu are still going to be set up so that they try to
open up an NSDocument, and since you don't have any of that set
up, the call fails because NSDocumentController can't find any
NSDocument class to use to open up the file. This can probably
be solved by subclassing NSDocumentController and overriding the
openDocumentWithContentsOfFile:display: method. To get your
subclass to be used as the shared NSDocumentController, you
should instantiate it in your main nib file.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.