Messing with the Trash
Messing with the Trash
- Subject: Messing with the Trash
- From: Rainer Brockerhoff <email@hidden>
- Date: Tue, 23 Oct 2001 14:25:00 -0200
I'm moving files to the trash and/or emptying it from inside my XRay
utility. The details of doing that, by themselves, are working OK.
However, I'm trying to notify the Finder that the trash's status has
been changed by calling [[NSWorkspace sharedWorkspace]
noteFileSystemChanged:] on the trashed items, on the trash folder
itself, on the trash folder's container... nothing works.
Emptying the trash doesn't change the Finder's trash icon until the
user clicks on it.
Moving files to the trash neither changes the icon nor makes them
appear inside the Finder's trash later.
What should I do to make this work correctly?
Another funny thing: I set my "Move to Trash" menu item shortcut to
command-delete, but the shortcut never activates my action - instead
I get a beep from NSWindow's sendEvent: method.
TIA,
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"Originality is the art of concealing your sources."
http://www.brockerhoff.net/ (updated Oct. 2001)