"No document could be created." error
"No document could be created." error
- Subject: "No document could be created." error
- From: Dragan Mili#263 <email@hidden>
- Date: Fri, 27 Nov 2009 00:30:01 +0100
Hi everybody,
I've got a document-based application which, up until recently, took advantage of the document-based API for all new document creation and opening of existing ones, which means I've never invoked methods like -[NSDocumentController openDocumentWithContentsOfURL:display:error:], -[NSDocumentController openUntitledDocumentAndDisplay:error:], or similar, everything was done by the Cocoa framework.
For the Snow Leopard compatible version of the application, I needed to provide some services for the system Services Menu (in order to make it up for some functionality covered by the CM plug-in in Leopard and earlier). That require to distinguish whether the application runs in "normal" or "service" mode and to present completely different UI for the same document type, depending on the running mode. Also, I needed to implement the behaviour similar to "service mode" if an existing document is open while pressing particular modifier key. For that reason I've overwritten (among others) - (void)application:(NSApplication *)sender openFiles:(NSArray *)fileNames NSApp delegate method and do different object initialisation depending on the mode in which application runs when opening a document.
Everything works fine, tested running Snow Leopard, Leopard and Tiger. However, two users (so far) reported a problem of getting the alert panel saying "No document could be created." when launching application. The main menu bar is completely empty, with exception of the application name menu item to the far left.
They say they get that even without trying to open any existing document or to create a new one, just immediately upon application launch. I've searched the list and found some relevant topics, but they all boil down to a fact of not having the right NSDocument subclass instance mapped into the appropriate document file in the "Info.plist" file. That's not my case, the affected users don't even see "The DocumentType type doesn't map to any NSDocumentClass" message logged (at least they say). What's even more strange the error doesn't happen to everyone, as I've said only two people (so far) have reported it.
Has anyone got any clue what could be going on in here? If you need parts of relevant code that opens existing and creates new documents, or an insight into the "Info.plist" file, please let me know.
Regards,
Milke
_______________________________________________
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