Re: Updating Trash icon
Re: Updating Trash icon
- Subject: Re: Updating Trash icon
- From: Ben Dougall <email@hidden>
- Date: Mon, 2 Jun 2003 13:15:04 +0100
On Monday, June 2, 2003, at 09:08 am, Sherm Pendley wrote:
On Monday, June 2, 2003, at 12:30 AM, Chad Armstrong wrote:
Is there a way to tell the Trash icon in the dock to update/refresh
itself from a Cocoa application? If I put or remove something into
the ~/.Trash directory, the icon will not update itself in the Dock
until I click on the icon.
Have you tried calling the NSWorkspace method -noteFileSystemChanged?
According to its description, it notifies Finder of new files, so if
there's a window to the affected folder open, Finder can update
itself. Perhaps it will work with the trashcan too.
i read something about this on the carbon list a little while ago.
somebody's opinion was the best way to deal with deleting files is to
ask the finder do it, whatever the way to do that is (apple events?).
that way the finder deals with any complications there maybe rather
than trying to deal with them yourself, such as the full/empty trash
icon and also handling two files of the same name being in the bin, and
maybe further issues.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.