• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems with custom handling of open AppleEvent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Problems with custom handling of open AppleEvent (From: "Sean McBride" <email@hidden>)

  • Prev by Date: SCNetworkReachabilityCreateWithName linking problem
  • Next by Date: Re: Button title irregularities
  • Previous by thread: Problems with custom handling of open AppleEvent
  • Next by thread: NSAnimation subclass calling display on a view
  • Index(es):
    • Date
    • Thread