On Dec 16, 2016, at 12:01 , Jeremy Hughes <moon.rab...@virginmedia.com> wrote: > > It’s just an application method, which overrides the method that the system > calls from printDocument when a user chooses Print.
Just to be clear, does the “it” in that sentence refer to “printDocumentWithSettings”? In that case, you don’t know for sure who calls it and when. It appears to documented that it’s called as part of the standard implementation of “printDocument”, but you don’t know if there are other circumstances where it’s called from somewhere else. AFAICT you are required to invoke the passed-in selector at the correct time. In your case, that’s in your own document:didPrint:contextInfo: method, and therefore (I think) is going to require an invocation because you can’t perform a selector with a non-object parameter. So, yes, you might have to write some Obj-C glue to do this properly. My guess is that “doing it wrong” is going to be harmless in the case of regular printing from a menu, but it might break if (for example) AppleScript was involved, or something like that. Anyway, it’s your decision what to do. At least you’re aware of the possible issue now. _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com