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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to