• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Updating the trash icon without NSWorkspace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updating the trash icon without NSWorkspace


  • Subject: Re: Updating the trash icon without NSWorkspace
  • From: Gregory Weston <email@hidden>
  • Date: Mon, 4 Feb 2008 08:04:29 -0500

Lachlan Cotter wrote:

I know there have been similar threads on here before, but they don't
address my particular issue.

I'm using NSFileManager methods to move files into the trash. As has
been mentioned by others, this doesn't update the trash icon in the doc.


...
There are probably tricks that could be used to get this to work, but
I wonder if there isn't a simple notification that can be raised to
cause the trash icon to update?

In any case, I would also need to update it when taking files out of
the trash, in which case NSWorkspace is no help.

If you're not determined to avoid NSWorkspace completely, you can just do this ...


[[NSWorkspace sharedWorkspace] noteFileSystemChanged:theTrashPath];

... any time you move a file into or out of the trash.
_______________________________________________

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


  • Prev by Date: Fetching a CalEvent with earliest startDate
  • Next by Date: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • Previous by thread: Re: Updating the trash icon without NSWorkspace
  • Next by thread: Once again: Clickable hyperlink in NSTableView
  • Index(es):
    • Date
    • Thread