unreliability of NSWorkspace selectFile
unreliability of NSWorkspace selectFile
- Subject: unreliability of NSWorkspace selectFile
- From: Matt Neuburg <email@hidden>
- Date: Fri, 03 Mar 2006 14:56:53 -0800
- Thread-topic: unreliability of NSWorkspace selectFile
I would like to reliably reveal *and* select a file/folder in the Finder.
I am using [[NSWorkspace sharedWorkspace] selectFile:path
inFileViewerRootedAtPath:folder].
It isn't reliable. Sometimes it selects the file; sometimes it selects the
containing folder instead. I've also tried issuing the command *twice*;
sometimes this solves the problem (now it selects the file) and opens only
one Finder window, other times it causes two Finder windows to open.
Does this match the observations of others? I think I might be able to work
around this by substituting Apple events, but it's more work, of course...
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden