I have observed that windowWillClose
is called when the user closes a window but is NOT called when the window is closed because of app termination.
Now, for me this is a good thing because I want a certain piece of code to run when the window is closed but not at shutdown.
The reason for the question is that I cannot see why this should be the case from the Apple docs (all it says is "Tells the delegate that the window is about to close."
). Can I rely on this behaviour not being "fixed" in future Cocoa versions?