Re: Problems with custom handling of open AppleEvent
Re: Problems with custom handling of open AppleEvent
- Subject: Re: Problems with custom handling of open AppleEvent
- From: Quincey Morris <email@hidden>
- Date: Tue, 2 Dec 2008 16:10:58 -0800
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 (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