• 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
NSDocumentController cannot open recent document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDocumentController cannot open recent document


  • Subject: NSDocumentController cannot open recent document
  • From: Adam Radestock <email@hidden>
  • Date: Wed, 20 Feb 2008 00:21:44 +0000

Hi everyone,

I've implemented a panel that opens on app startup which lists recent documents in an NSTableView, getting the file URLs from NSDocumentController's recentDocuments method.

The table view shows the list of recent documents fine, but when the user double clicks on a table view cell to open the document, NSDocumentController returns an error - "loadDataRepresentation:ofType: is a subclass responsibility but has not been overridden."

This is the code I have to do this:

[[NSDocumentController sharedDocumentController] openDocumentWithContentsOfURL:[[[NSDocumentController sharedDocumentController] recentDocumentURLs] objectAtIndex: [recentDocsTableView clickedRow]] display:YES];

From reading the NSDocumentController's documentation, the shared document controller should load my custom NSDocument subclass based on the file type, but it does not seem to do this...

Has anyone come across this before who could point me in the right direction? Any help would be greatly appreciated.

Adam 'Raddish' Radestock
Glass Monkey Software
www.glassmonkey.co.uk
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Core Data Performance
  • Next by Date: A window that rejects focus
  • Previous by thread: [Meet] : Los Angeles CocoaHeads Thursday 2/21 at 7:30pm
  • Next by thread: A window that rejects focus
  • Index(es):
    • Date
    • Thread