Topic: File dialog box

Many times I want to enter the name of a data file that is quite long. Typing it in is a pain, and the data files all have different names. A standard file dialog box would be nice. I believe it is available for the windows version? But I use a Mac. In a different fortran you got the standard file dialog box just be setting the file name to a null string in the Open statement. It was really nice.

Could you please add this feature to the Mac version?

Unless its available in some way I have not found, in which case: How do i do it?

Re: File dialog box

The AppGraphics library on Windows does offer access to file dialogs from Fortran, but it isn't integrated with the Fortran OPEN statement at all. 

I could probably devise a way to wrap an Objective-C call to request the macOS file dialog and return a name, but it might be tricky.  I would need to look into it.  But we don't have any plans to implement an AppGraphics-like interface on macOS, unfortunately.

Jeff Armstrong
Approximatrix, LLC

Re: File dialog box

A native macOS file dialog would definitely make this easier, especially for long filenames. Even a small helper function returning the selected path would be useful without changing the OPEN statement itself.

4

Re: File dialog box

macOS file dialogs are substantially more complicated than Windows, so it is unlikely we'll be able to provide a similar experience.  Windows doesn't even require a "Windows application" (in other words, a command line program would work) to open system dialogs, and the API hasn't changed since Windows 2000 (though the earlier API still works too).  macOS file dialogs on the other hand are accessed via Objective-C (in our case), are asynchronous by default, and require some care in regards to deprecated APIs based on the OS version available.

Jeff Armstrong
Approximatrix, LLC