• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Open Recent menu in non-doc app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Open Recent menu in non-doc app
      • From: Ali Ozer <email@hidden>
  • Prev by Date: looking for a developer
  • Next by Date: is this proper form? (solution to trapping enter on table view)
  • Previous by thread: Re: Open Recent menu in non-doc app
  • Next by thread: Re: Open Recent menu in non-doc app
  • Index(es):
    • Date
    • Thread