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: Sat, 02 Mar 2013 16:05:26 -0800
On Mar 2, 2013, at 13:17 , "Mills, Steve" <email@hidden> wrote:
> But I'm not calling runModalPrintOperation, nor do I want to, because we need to do something completely different at this point. This is the reason I'm overriding printDocumentWithSettings in the first place. I just need to know how to call the selector like I stated before.
Take a look at this:
https://developer.apple.com/library/mac/#releasenotes/Cocoa/AppKitOlderNotes.html
and search for the heading "Advice for Overriders of Methods that Follow the delegate:didSomethingSelector:contextInfo: Pattern".
If the code sample makes your eyeballs hurt, I don't blame you. It's the kind of hackery that could be avoided with blocks, but this delegate/selector pattern pre-dates blocks.
The other gotcha is that NSInvocation doesn't take ownership of any objects referred to by its arguments. That means being very careful when using ARC, since it can't memory-manage them for you.
_______________________________________________
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