Skip navigation
Daves61
Currently Being Moderated

How to choose .app files in the FileOpenChooser dialog?

Aug 18, 2012 10:07 AM

Tags: #mac #indesign #plugin #fileopenchooser #.app_file

Hi,

 

I am working on a plugin and want to allow the user to browse through the system to choose an .app (Application) file on Mac.

Currently I'm using OpenDialog() function of SDKFileOpenChooser dialog for this. It's working correctly on Windows but on Mac, when the dialog opens up, .app file appears to be disabled (Not selectable).

Please tell me what filter should I add so that one can choose files with extension .app.

 
Replies
  • Currently Being Moderated
    Aug 19, 2012 6:37 PM   in reply to Daves61

    There is a method AddExtension in the interface IOpenFileDialog.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 22, 2012 5:10 AM   in reply to Daves61

    On OS X a .app file is just a special type of directory (you can verify this by right clicking on one in finder and selecting "Show Package Contents"). Could that be why it isn't showing up in the file chooser? I had a similar issue with Air's file chooser on a recent project.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 22, 2012 7:34 AM   in reply to Daves61

    You could try SDKFolderChooser and see if that works. If it does you could try looking at the source for SDKFolderChooser (in <SDK>/common/SDKFileHelper.cpp), see how it gets the IOpenFileDialog, and see if you can add a filter to that directly to only let the user select .app files. Not sure if that will work, but it might be worth trying at least.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points