Finder vs. Path Finder from proxy icon menu

David Swofford's Avatar

David Swofford

29 Mar, 2013 02:40 PM

I use the standard OS X feature of command-clicking a window's proxy icon to get a popup menu of the folder hierarchy containing the associated file. For most applications, selecting an item from this menu causes the corresponding folder to be opened in Path Finder. For some applications, however, the folder is opened in the Finder rather than Path Finder. The application that I develop and distribute is one of these applications.

I believe the difference is whether the application is Carbon-based versus Cocoa. My application is (sigh) still written in Carbon. Other application that behave like mine with respect to Finder vs. Path Finder include BBEdit and Microsoft applications (Word, Excel, etc.).

Do you know of any way that I can force the use of Path Finder rather than Finder from a Carbon-based application? I hate that my application opens Finder--it's basically the only way Finder windows ever get opened on my computer, and then I have to immediately reveal the item in Path Finder from Finder followed by closing the Finder window. I'd also love it if BBEdit worked this way as well (I realize Microsoft is probably a lost cause).

  1. Support Staff 1 Posted by Dragan on 12 Apr, 2013 12:05 PM

    Dragan's Avatar

    Hi David,

    I don't really know whether there is any function call in Carbon that can do that. If you had used Cocoa, you would've used the NSWorkspace method -[NSWorkspace selectFile:inFileViewerRootedAtPath:]. Even that is not very well documented regarding how it works, but the old release notes from Apple, somewhere in the 10.4 section you'll find this quote:

    The method selectFile:inFileViewerRootedAtPath: now consults a user default named "NSFileViewer", and if present, uses it as the bundle ID of the application to use as the file viewer to select the file in. If this default is not set, or there is no corresponding registered application, then Finder is used as normal. selectFile:inFileViewerRootedAtPath: is the method applications should use for "Reveal in Finder" functionality.

    And what Path Finder actually does when you select it as the default file browser is to write that preferences key (NSFileViewer) and set it to com.cocoatech.PathFinder in preferences file of installed applications.

  2. Dragan closed this discussion on 12 Apr, 2013 12:05 PM.

  3. David Swofford re-opened this discussion on 12 Apr, 2013 02:37 PM

  4. 2 Posted by David Swofford on 12 Apr, 2013 02:37 PM

    David Swofford's Avatar

    Thanks for getting back to me.

    Just to be clear, I already call other Cocoa functions from my Carbon application, and can use selectFile:inFileViewerRootedAtPath: to correctly reveal the file from a standard menu item. My problem is different: I want the Carbon event handlers to somehow respect the NSFileViewer (or some other default preference) setting when the user selects a folder from the menu connected to a window's proxy icon. I'm not surprised that there isn't a way to do this; I was just hoping there might be some other way for Path Finder to hook into the Carbon event hierarchy.

  5. David Swofford closed this discussion on 12 Apr, 2013 02:38 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac