• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Over Riding Print Function in Cocoa PDE Plugin
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Over Riding Print Function in Cocoa PDE Plugin


  • Subject: Re: Over Riding Print Function in Cocoa PDE Plugin
  • From: David Duncan <email@hidden>
  • Date: Wed, 19 Aug 2009 10:36:11 -0700

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 (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


References: 
 >Over Riding Print Function in Cocoa PDE Plugin (From: Siva Manne <email@hidden>)

  • Prev by Date: Starting editing for a Row as soon as it is Added. (More Detail)
  • Next by Date: Detect Keyboard Layout for CGKeyCodes
  • Previous by thread: Over Riding Print Function in Cocoa PDE Plugin
  • Next by thread: Re: Allowing error-prone code line to persist in app
  • Index(es):
    • Date
    • Thread