Conversation
|
Nice. But I would prefer that we use the AppKit/NSDocument autosave interface since there is one. See http://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSDocument_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDocument/autosaveDocumentWithDelegate:didAutosaveSelector:contextInfo: |
|
I think I wasn't clear, but from reading the autosave interface docs I understand it's purpose is to save a file every x seconds, when my patch is about saving focus after cmd-tabbing away from the app. |
|
I see, but what I would want us to do is to use the autosave mechanics (except from the interval triggering part). When the app loses focus, simply: I'd like us to avoid re-inventing a wheel which has already been invented. :) |
|
Well, ok, I understand your reasons for using autosave, but I still think it's not the best way to do it, because if a document isn't saved it'll save it to a temporary location (which is not wanted I think). if ([doc hasUnautosavedChanges] && doc.url ) But to me it feels like abusing the auto save feature :) |
Added Autosave after losing focus feature, accessible from debug menu