Re: NSPersistentContainer with alternate stores

2016-12-16 Thread Aaron Tuller
check out: https://developer.apple.com/reference/coredata/nspersistentcontainer/1640577-persistentstoredescriptions?language=objc you can set the store type there: https://developer.apple.com/reference/coredata/nspersistentstoredescription/1640609-type?language=objc -aaron > On Dec 11, 2016, a

Re: didPrint selector not called

2016-12-16 Thread Manoah F. Adams
On Dec 16, 2016, at 08:45:00, Jeremy Hughes wrote: 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, context

Re: didPrint selector not called

2016-12-16 Thread Jeremy Hughes
> On 16 Dec 2016, at 21:54, Jeremy Hughes wrote: > >> In that case, you don’t know for sure who calls it and when. It appears to >> documented that it’s called as part of the standard implementation of >> “printDocument”, but you don’t know if there are other circumstances where >> it’s calle

Re: didPrint selector not called

2016-12-16 Thread Jeremy Hughes
> On 16 Dec 2016, at 21:40, Quincey Morris > wrote: > > On Dec 16, 2016, at 12:01 , Jeremy Hughes wrote: >> >> It’s just an application method, which overrides the method that the system >> calls from printDocument when a user chooses Print. > > Just to be clear, does the “it” in that senten

Re: didPrint selector not called

2016-12-16 Thread Quincey Morris
On Dec 16, 2016, at 12:01 , Jeremy Hughes wrote: > > It’s just an application method, which overrides the method that the system > calls from printDocument when a user chooses Print. Just to be clear, does the “it” in that sentence refer to “printDocumentWithSettings”? In that case, you don’t

Re: didPrint selector not called

2016-12-16 Thread Jeremy Hughes
> This is what I’ve currently got. It works OK, but the dictionary conversion > seems clunky to me. > > override func printDocument(sender: AnyObject?) > { > let didPrintSelector = #selector(document(_:didPrint:contextInfo:)) > > let dictionary = printInfo.dictionary() >

Re: didPrint selector not called

2016-12-16 Thread Jeremy Hughes
> On 16 Dec 2016, at 20:17, Jeremy Hughes wrote: >>> I'm not an expert in this part of Cocoa. Are there implicit system >>> *callers* of this method, or is it more of a system *utility* that you're >>> expected to call from your own code? If it's the latter, then maybe >>> instead of overridi

Re: didPrint selector not called

2016-12-16 Thread Jeremy Hughes
> On 16 Dec 2016, at 20:01, Jeremy Hughes wrote: > >>> OK - I misunderstood what Quincey was saying. >>> >>> The passed-in delegate and selector are nil, but I obviously can’t be sure >>> that they will always be nil. >>> >>> All I’m actually trying to do is to clean up some objects that need

Re: didPrint selector not called

2016-12-16 Thread Jeremy Hughes
>> OK - I misunderstood what Quincey was saying. >> >> The passed-in delegate and selector are nil, but I obviously can’t be sure >> that they will always be nil. >> >> All I’m actually trying to do is to clean up some objects that need to exist >> during the print operation. Is this the best w

Re: didPrint selector not called

2016-12-16 Thread Jeremy Hughes
Also, NSInvocation (used in the release notes sample code) is unavailable in Swift. Jeremy -- > On 16 Dec 2016, at 19:33, Jeremy Hughes wrote: > >> >> On 16 Dec 2016, at 19:29, John McCall wrote: >> >>> On Dec 16, 2016, at 11:24 AM, Jeremy Hughes >>> wrote: >>> Thanks for the link. >>>

Re: didPrint selector not called

2016-12-16 Thread John McCall
> On Dec 16, 2016, at 11:33 AM, Jeremy Hughes > wrote: >> On 16 Dec 2016, at 19:29, John McCall wrote: >> >>> On Dec 16, 2016, at 11:24 AM, Jeremy Hughes >>> wrote: >>> Thanks for the link. >>> >>> I’ve looked at it, and I don’t think it applies in this case, because I’m >>> not actually ov

Re: didPrint selector not called

2016-12-16 Thread Jeremy Hughes
> On 16 Dec 2016, at 19:29, John McCall wrote: > >> On Dec 16, 2016, at 11:24 AM, Jeremy Hughes >> wrote: >> Thanks for the link. >> >> I’ve looked at it, and I don’t think it applies in this case, because I’m >> not actually overriding the document(_:didPrint:contextInfo:) method, just >>

Re: didPrint selector not called

2016-12-16 Thread John McCall
> On Dec 16, 2016, at 11:24 AM, Jeremy Hughes > wrote: > Thanks for the link. > > I’ve looked at it, and I don’t think it applies in this case, because I’m not > actually overriding the document(_:didPrint:contextInfo:) method, just > providing it as a callback. There isn’t an override keyword

Re: didPrint selector not called

2016-12-16 Thread Jeremy Hughes
Thanks for the link. I’ve looked at it, and I don’t think it applies in this case, because I’m not actually overriding the document(_:didPrint:contextInfo:) method, just providing it as a callback. There isn’t an override keyword before the method, and there isn’t a superclass method that I can

Fwd: didPrint selector not called

2016-12-16 Thread Jeremy Hughes
Sorry - I forgot to copy to the list. Jeremy -- > Begin forwarded message: > > From: Jeremy Hughes > Subject: Re: didPrint selector not called > Date: 16 December 2016 at 19:15:10 GMT > To: John McCall > >> On 16 Dec 2016, at 17:24, John McCall wrote: >> >>> On Dec 16, 2016, at 8:45 AM, Je

Re: Requires High Performance Graphic Card - Why?

2016-12-16 Thread Jens Alfke
… and by total coincidence, I just received the iOS Dev Weekly newsletter, which links to a blog post written a few days ago describing this in great detail: http://supermegaultragroovy.com//2016/12/10/auto-graphics-switching

Re: Requires High Performance Graphic Card - Why?

2016-12-16 Thread Jens Alfke
> On Dec 15, 2016, at 11:19 PM, Alastair Houghton > wrote: > > This is one of those things that you just need to know. You need to add the > key NSSupportsAutomaticGraphicsSwitching to your app’s Info.plist; see > > https://developer.apple.com/library/content/qa/qa1734/_index.html >

Re: didPrint selector not called

2016-12-16 Thread Quincey Morris
On Dec 16, 2016, at 08:45 , Jeremy Hughes wrote: > > override func printDocumentWithSettings(printSettings: [String : AnyObject], > showPrintPanel: Bool, delegate: AnyObject?, didPrintSelector: Selector, > contextInfo: UnsafeMutablePointer) > { > let didPrint = #selector(Document.document

Re: didPrint selector not called

2016-12-16 Thread John McCall
> On Dec 16, 2016, at 8:45 AM, Jeremy Hughes > wrote: > 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: Bo

didPrint selector not called

2016-12-16 Thread Jeremy Hughes
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) { print("document was pr