Tracking moved documents
Tracking moved documents
- Subject: Tracking moved documents
- From: Rainer Brockerhoff <email@hidden>
- Date: Fri, 5 Oct 2001 19:17:34 -0300
The recent AppKit release notes state:
>
Open documents now have the ability to track the files from which they were opened (or to which they were most recently saved) so that they
>
withstand the sort of moving and renaming of documents, folders, and volumes that the user can do with the Finder. This feature manifests itself
>
in the user interface in two ways:
>
- If the user uses the Finder to move or rename an open document, a containing folder, or the volume, the document window's title and document
>
location menu (as seen when you command-click on the window title) will be updated automatically when the application is reactivated.
>
- When the users attempts to save a document after any of the above operations have been performed, an appropriate alert panel may be presented
>
to let the user select an appropriate action.
>
>
As a result of this addition, instances of NSDocument will be sent several messages, -setFileName: in particular, more frequently than they have
>
been in the past.
I need to track files when they've been moved or renamed, as described above.
My document window indeed shows the change in the proxy icon, but -setFileName doesn't seem to get called when that happens - nor does any other method I could think of.
Does anybody have more info on how to get a notification that the file have been changed?
TIA,
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"Originality is the art of concealing your sources."
http://www.brockerhoff.net/ (updated Oct. 2001)