Re: Where and how do I know a save completed successfully?
Re: Where and how do I know a save completed successfully?
- Subject: Re: Where and how do I know a save completed successfully?
- From: Charles Jenkins <email@hidden>
- Date: Wed, 29 Apr 2015 18:59:30 -0400
Thank you, Uli and everyone. I’ll check out updateChangeCount:
I did file a bug report about the compiler crash caused by my syntax.
—
Charles
On April 29, 2015 at 10:19:22 AM, Uli Kusterer (email@hidden) wrote:
On ٢٩/٠٤/٢٠١٥, at ١١:٠٨, Charles Jenkins <email@hidden> wrote:
I think it most likely I’m doing this in the wrong place. But what’s the right place? Overriding NSDocument’s setFileModificationDate() would seem like the best way, but the NSDocument Programming guide says messages are sent to setFileURL:, setFileType: and setFileModificationDate: “if appropriate,” so I’m not sure I can count on getting that message.
I don't think that's a good spot, as it isn't explicitly connected to file saving. I'd try updateChangeCount: instead, and check for NSChangeCleared.
Also, keep in mind that "Save to..." and the likes also may get used on your document, saving to a different file but (IIRC) leaving the original document dirty. Maybe I'm misremembering what they do, but all those definitely need testing.
-- Uli
http://stacksmith.org
_______________________________________________
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