Date
1 - 7 of 7
Opening File in Finder
Gerriet M. Denkmann
I want to have a Finder window with “/a/hugeFolder/someThin"g selected.
[ NSWorkspace.sharedWorkspace openFile: @“/a/hugeFolder/someThing” withApplication: @“Finder" ] results in an AlertPanel: “There is no application to open “someThing””. But I do *not* want to open “someThing”, I just want it selected in Finder. How to do this? AppleScript comes to mind; but I am terrible bad at AppleScript. Gerriet. |
|
Quincey Morris
So, doesn’t NSWorkspace’s activateFileViewerSelecting method do that?
toggle quoted message
Show quoted text
|
|
Gerriet M. Denkmann
On 9 Nov 2017, at 02:03, Quincey Morris <quinceymorris@...> wrote:It does indeed. Thanks very much for telling me. Kind regards,On Nov 8, 2017, at 10:54 , Gerriet M. Denkmann <g@...> wrote: Gerriet. |
|
Andy Lee
Hi Gerriet,
toggle quoted message
Show quoted text
Try this: BOOL didSelect = [[NSWorkspace sharedWorkspace] selectFile:filePath inFileViewerRootedAtPath:containingDirPath]; -Andy On Nov 8, 2017, at 1:54 PM, Gerriet M. Denkmann <g@...> wrote:
|
|
Andy Lee
Oh wow, I didn't know about that method -- perhaps because my code predated 10.6. :) --Andy On Nov 8, 2017, at 2:03 PM, Quincey Morris <quinceymorris@...> wrote:
|
|
Quincey Morris
On Nov 8, 2017, at 11:05 , Andy Lee <aglee@...> wrote:
Perhaps. :) |
|
Quincey Morris
Oops, sorry, that was weird. Mail sent that message when I just closed the window, which wasn’t what I intended to happen.
I was in the process of composing an extremely witty response, but it wasn’t coming out witty at all. Luckily I succeeded in deleting the extremely unwitty text before Mail decided to send the rest of the message.
Feel free to insert your own extremely witty response here. |
|