Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > kqueue-driven Finder notifier for 10.3. Developer needs help.

kqueue-driven Finder notifier for 10.3. Developer needs help.
Thread Tools
Mac Elite
Join Date: Feb 2001
Location: Canaduh
Status: Offline
Reply With Quote
Sep 12, 2003, 10:14 PM
 
From Ars Technica forum:

From the 10.3 prerelease thread, it appears that Panther's finder still doesn't update its windows in response to filesystem activity.
That is, if you created/delete files using the terminal, or any other app that doesn't keep the finder updated, those changes don't show up until you click on the finder window in question.

Fortunately, Panther offers kqueue/kevent notifiers, so that apps can automatically be notified about filesystem changes. Unfortunately, Apple doesn't seem to have integrated this in with the finder yet.

Fortunately again, our own calumr had the good idea to think of making a 3rd party daemon that would register for kqueue notifications on all of the windows the finder has open (and possibly all the folders with folder action scripts), and then notify the finder about the changes with Cocoa's -[NSWorkspace noteFileSystemChanged:] method.

So, this is looking like a nice easy project to work on that would be pretty useful.
I'd start today, but there are a few little catches that I was wondering if the Ach could help with.

(1) Finding out what windows the finder has open
To work right, this would need a list of all of the windows the finder has open and all of the folders in list view with the disclosure triangles down.
I know you can get information about the former with AppleScript or AppleEvents, but how about the latter?

(2) Avoiding polling
It would be nice for the daemon to register with the finder, the WM, or the AppleEvents service to be notified about window openings and closings. This way, it wouldn't have to constantly poll the finder to find this information out. (I'd like to avoid polling -- sort of defeats the purpose of using kqueue!)
Is this possible?

(3) Finding out (without polling?) what folders have folder actions attached
I'm at a loss here. Not enough experience.

So! Anyone got any ideas, or interested in helping?

Thanks,
Zach
Mac Ach Dev Project: Using kqueue to make Panther's Finder responsive?

Definition: kqueue, kevent
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:27 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2