• 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
unreliability of NSWorkspace selectFile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: unreliability of NSWorkspace selectFile
      • From: Manfred Schwind <email@hidden>
    • Re: unreliability of NSWorkspace selectFile
      • From: John Pannell <email@hidden>
  • Prev by Date: Re: Advice on using NSCell
  • Next by Date: Re: Bezier drawing tool suggestions?
  • Previous by thread: Re: I can't figure out how to use NSIndexSet
  • Next by thread: Re: unreliability of NSWorkspace selectFile
  • Index(es):
    • Date
    • Thread