Re: Documents not opening from Finder
Re: Documents not opening from Finder
- Subject: Re: Documents not opening from Finder
- From: Quincey Morris <email@hidden>
- Date: Fri, 01 Mar 2013 17:01:31 -0800
On Mar 1, 2013, at 14:59 , Steve Mills <email@hidden> wrote:
> Sorry, I still consider myself a newbie in Cocoaland. I can add those open and print overrides to my NSApplicationDelegate, but I only want to be able to set breakpoints on them but still let the default behavior happen. Since NSApplicationDelegate doesn't actually implement those methods, I can't simply call [super application:sender openFiles:filenames]; to get that default behavior. So what do I do? I need everything to work at least once in the normal way so I can then see which methods might not be getting called when things start going wrong.
Well, yes, good point. Answers are buried in here:
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/SAppsHandleAEs.html#//apple_ref/doc/uid/20001239
under the heading "Apple Events Sent by the Mac OS". That brings us back to AppleEventland, in a sense, but the point is to pull out of this documentation the standard invocations of NSDocumentController or NSDocument methods, and use those in your app delegate methods.
Unfortunately, this document appears to date from 10.4 times, but it should lead you to the information you want. In practice, you'll likely only care about providing 2 app delegate methods: 'application:openFile:' (or 'application:openFiles:') and 'application:printFiles:withSettings:showPrintPanels'.
_______________________________________________
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