title: Save/restore NSWindow position
body: <p>I have a document based Mac app and I'm trying to save/restore the window position for each of my document windows.</p>
  
  <p>I'm calling setWindowFrameAutosaveName on the NSWindowController when the document loads (setting it to the file name) and all is well. </p>
  
  <p>Problem I have is how to deal with the scenario where a new document is created and the user closes the window and then chooses where to save the new document - I can't figure out where to call setWindowFrameAutosaveName such that it's after the document has a path but before the window controller has persisted the position.</p>
  
  <p>Any pointers would be most welcome!</p>
  
  <p>Thanks</p>