On Mar 2, 2013, at 1:17 PM, "Mills, Steve" <smi...@makemusic.com> wrote:
> On Mar 2, 2013, at 15:06, "Kyle Sluder" <k...@ksluder.com> wrote: > >> The documentation is pretty clear about how NSDocument's default >> implementation works. -[NSDocument >> runModalPrintOperation:delegate:didPrintSelector:context:] is what actually >> messages the delegate with the didPrintSelector. As long as you are calling >> that method with those arguments (either directly or by calling super in >> your override of -printDocumentWithSettings…), the delegate will be messaged >> appropriately. > > But I'm not calling runModalPrintOperation, nor do I want to, because we need > to do something completely different at this point. That's relevant information that you should really mention upfront. > 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. There are two ways: 1. Cast objc_msgSend to (void)(id, SEL, id, BOOL, void*) and call it with the correct arguments. 2. Build an NSInvocation and invoke it. You will probably want to create a dummy implementation of the didPrintSelector so you can get its method signature via -methodSignatureForSelector:. --Kyle Sluder _______________________________________________ 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