Preventing Document from closing

2015-04-04 Thread Markus Spoettl
Hi, in an NSDocument based application, is there a reliable way to prevent a document from closing and the app itself from terminating? I'm having a very difficult time understanding now -canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo: is supposed to work. Contrary to the

Re: Preventing Document from closing

2015-04-04 Thread Markus Spoettl
Hi Quincey, On 04/04/15 10:16, Quincey Morris wrote: [...] [..life saving code snipped..] [...] The first branch of the ‘if’ statement is the code you want, that prevents the document from closing. Note that it doesn’t involve a separate method. Rather, it just invokes the supplied selector but

Re: Preventing Document from closing

2015-04-04 Thread Quincey Morris
On Apr 4, 2015, at 00:07 , Markus Spoettl ms_li...@shiftoption.com wrote: and not as the documentation indicates document:shouldClose:contextInfo: Every time I try to make sense of this and the header comments, my head starts spinning. It says that’s the *signature*, not the