On Dec 2, 2008, at 15:49, Sean McBride wrote:

1) Subclassing NSDocumentController and implementing
openDocumentWithContentsOfURL:display:error:.  This almost works
perfectly. I can detect .foo files and do my special handling, but when I return nil, Cocoa 'helpfully' displays a generic error message, which I do not want. Even overriding willPresentError: to return nil doesn't
suppress the alert.


Create an error with domain==NSCocoaErrorDomain and code==NSUserCancelledError and return nil from openDocumentWithContentsOfURL:display:error:.


_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to