• 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
didPrint selector not called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

didPrint selector not called


  • Subject: didPrint selector not called
  • From: Jeremy Hughes <email@hidden>
  • Date: Fri, 16 Dec 2016 16:45:49 +0000

Hi,

I’m overriding printDocumentWithSettings in order to get a notification for when printing has finished, but the didPrint selector is never called.

This is the code:

class func document(document: NSDocument, didPrint: Bool, contextInfo: UnsafeMutablePointer<Void>)
{
	print("document was printed”)
}

override func printDocumentWithSettings(printSettings: [String : AnyObject], showPrintPanel: Bool, delegate: AnyObject?, didPrintSelector: Selector, contextInfo: UnsafeMutablePointer<Void>)
{
	let didPrint = #selector(Document.document(_:didPrint:contextInfo:))

	super.printDocumentWithSettings(printSettings, showPrintPanel: showPrintPanel, delegate: delegate, didPrintSelector: didPrint, contextInfo: contextInfo)
}

Does anyone know why this doesn’t work?

Jeremy


_______________________________________________

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


  • Follow-Ups:
    • Re: didPrint selector not called
      • From: Quincey Morris <email@hidden>
    • Re: didPrint selector not called
      • From: John McCall <email@hidden>
  • Prev by Date: Re: Requires High Performance Graphic Card - Why?
  • Next by Date: Re: didPrint selector not called
  • Previous by thread: Re: Requires High Performance Graphic Card - Why?
  • Next by thread: Re: didPrint selector not called
  • Index(es):
    • Date
    • Thread