When my OS X app closes (via the Quit button in the menu), I need to write out a text file. The applicationWillTerminate method isn't being called. It's in my app delegate. I've spent hours & hours reading posts on the same problem, with no resolution. The Apple doc didn't help either.