On Aug 17, 2009, at 11:27 PM, Siva Manne wrote:

Is it possible to overriding the print function in Cocoa PDE Plugin ?.
I need to do execute some piece of code before printing. In Cocoa PDE Plugin In the sample PDEPlugin code given by apple i found that when i launch the
print dialogue and if i select print the only function gets called is
dealloc. If i launch the OutputBins Features then a function
saveValuesAndreturnError gets called. I need to call my function when the
user clicks print.Is there any way to do this ?


Your plugin will have -shouldPrint: called when the print button is clicked, but before the print job is actually sent. You can return NO if you need to stop printing for some reason, but at the least you know that the print button has been clicked. This is demonstrated in the PasswordPDE part of the OutputBins2PDE sample code and is available on Mac OS X 10.5 or later.

<http://devworld.apple.com/samplecode/OutputBins2PDE/>
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to