• 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: Watching folders for new files and event handling based on that?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Watching folders for new files and event handling based on that?


  • Subject: Re: Watching folders for new files and event handling based on that?
  • From: Alastair Houghton <email@hidden>
  • Date: Sat, 11 Aug 2007 09:44:32 +0100

On 11 Aug 2007, at 08:39, Uli Kusterer wrote:

1) A user may be waiting for the download to finish with your window open, then decide to play a round of Mine S^H^H^H Solit^H^H^H Chess, glancing over at your background window occasionally to see whether the download's finished. If you don't update until it's activated, your window will not update correctly.

The solution I mentioned probably wouldn't be appropriate---on its own---for a Finder replacement, but it should be fine for many applications. I agree that sometimes it would be better to wait a short time before updating (to avoid the double-click problem you mention), and that paying attention to the NSWorkspace notifications would be a good idea (which I think will deal with your download situation without resorting to kqueue). And obviously you wouldn't just update one window in your app if two of them happen to be pointing at that folder.


3) This is only possible if your view will already be open. With an app like Hazel, that generally watches your folders in the background, that won't work.

Sure. It doesn't solve 100% of problems. But it also doesn't rely on a feature that won't work with network filesystems (and far too many people currently don't test this case, I might add); it also scales much better than (for instance) kqueue for some purposes, because to use the latter you have to open file descriptors for each monitored folder.


Kind regards,

Alastair.

--
http://alastairs-place.net




_______________________________________________

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


References: 
 >Watching folders for new files and event handling based on that? (From: Tim Perrett <email@hidden>)
 >Re: Watching folders for new files and event handling based on that? (From: Alastair Houghton <email@hidden>)
 >Re: Watching folders for new files and event handling based on that? (From: Uli Kusterer <email@hidden>)

  • Prev by Date: n00b question about includes
  • Next by Date: Newbie question (if statement)
  • Previous by thread: Re: Watching folders for new files and event handling based on that?
  • Next by thread: Re: Watching folders for new files and event handling based on that?
  • Index(es):
    • Date
    • Thread