On Mar 2, 2013, at 13:17 , "Mills, Steve" <smi...@makemusic.com> 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 (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

Reply via email to