NSDocumentController cannot open recent document
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