"No document could be created." error

Dragan Milić <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
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:YES  
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.




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

_______________________________________________
MacOSX-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.