> On 13 Apr 2015, at 15:01, Mike Abdullah <mabdul...@karelia.com> wrote: > > I think the document system monitors the file, and calls -setFileURL: when it > detects a change. Good catch there Mike!
-setFileURL: does indeed get called immediately the file gets renamed, moved or trashed, I am not sure that my data layer can tolerate the mutation just yet but at least I am in on the action now. Thanks a lot. Jonathan > > I’m not sure how careful that monitoring is, though, whether it happens > continuously, or only at the moment the app or document regains focus. > >> On 13 Apr 2015, at 14:19, Jonathan Mitchell <jonat...@mugginsoft.com> wrote: >> >> I have a Cocoa document app that represents a sqlite backed document type >> (its not CoreData). >> Users can (and do) delete documents while they are open in the app. >> The app then crashes in the sqlite data layer whenever data access occurs. >> The data layer is Mono based, not Cocoa. >> >> I want to try and deal with this situation in a less dramatic way than a >> crash. >> >> TextEdit.app can detect when an open file moves to the trash and throws up a >> popover - though I cannot trace this down in the example source. >> >> I know about the existence of NSFileImmutable but is that the route to take? >> >> Any input would be a help. >> >> Thanks >> >> Jonathan >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> >> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) >> >> 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: >> https://lists.apple.com/mailman/options/cocoa-dev/mabdullah%40karelia.com >> >> This email sent to mabdul...@karelia.com > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com