I could not find a way to do this. I expected to find a method NSWindowDelegateor NSWindowwhich is called before the invitation to save, but none of the obvious candidates ( windowWillClose, close, performClose, windowShouldClose) is not.
As a workaround, instead of setting, NSWindowController.documentI use a custom property to transfer the document. If documentset to NIL, the save request is no longer displayed.
source
share