Auto-saving documents
Auto-saving documents
- Subject: Auto-saving documents
- From: Chris Idou <email@hidden>
- Date: Sun, 1 Feb 2009 15:52:31 -0800 (PST)
I want my app to automatically save a document when the user closes its window, without prompting the user.
I had thought I'd found a solution by overriding
- (void)canCloseDocumentWithDelegate:(id)delegate shouldCloseSelector:(SEL)shouldCloseSelector contextInfo:(void*)contextInfo
to call saveDocument: in the NSDocument. But apparently saveDocument can call canCloseDocumentWithDelegate: resulting in an endless loop.
I thought of overriding windowShouldClose: etc, but that doesn't happen until after the user is prompted if they want to save.
What is the correct way to achieve this?
Stay connected to the people that matter most with a smarter inbox. Take a look http://au.docs.yahoo.com/mail/smarterinbox
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden