gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
1619 Posts in 535 Topics by 781 Members - Latest Member: chekyl43 January 27, 2023, 04:24:02 PM
*
gfx* Home | Help | Search | Login | Register | gfx
gfx
Absoft User Forum  |  Support  |  Macintosh  |  Standard file dialog with MRWE on MacOSX
gfx
gfxgfx
 

Author Topic: Standard file dialog with MRWE on MacOSX  (Read 4613 times)

michalowicz

  • Newbie
  • *
  • Posts: 7
Standard file dialog with MRWE on MacOSX
« on: December 07, 2007, 06:35:46 PM »
With old Absoft FORTRAN compilers, there was a subrouitne named stdfil which helped to open for read or write files with the MacOSy (y<= 7) standard file dialog box. The advantage of this routine is that it was possible to choose to define the last opened file volume has the default volume, or not.
Now, with the MacOSX compilers, MRWE provide another way to open Standard Dialog box for reading or writing files :
OPEN(file='',.....) : empty filename. It works nicely, and it is also available on the Windows compiler. Very uselful if you want to compile the same MRWE code and open files in the same manner on the two systems.
Unfortunately, there is a problem for MacOSX : the default volume cannot be set directly in the open(file='',...) statement. The default volumes is set automatically to the program folder, not to the last opened file one.
I am trying to compile a very complicated batch code (for physics calculaitons) where a lot (sometimes hundreds) of files are written automatically during the batch code execution, in many routines in the fortran code, so I cannot replace each open statement by empty filenames ones : I cannot stay for hours during the batch execution and wait to answer each time the programm asks for writing a file !. I am not the author of this code, and I cannnot change it except on very specific and limited places. On the Mac, these automatic files are written in the program folder event if I open the input file with the standard open file dialog. I think the only way to fix this problem is to avoid the use of the MRWE facility and to write my own Standard File Dialog routine, using the MacOSX APIs. If anybody can give me another, simpler, solution, of has already written this stdfil routine for MacOSX, I would be very grateful.
I have tried to get the complete pathname of the opened input file with the inquire statement. Unfortunately this statement seems to return only the short filename, not the complete pathname. If there is a way to get it with a standard fortran I/O statement, I think it could be the solution, because it is easy to append each automatic filename to the same pathname, determined as the input file path. But I have not found how to do so,except typing the pathname by hand.

Best regards
Alain Michalowicz


Absoft User Forum  |  Support  |  Macintosh  |  Standard file dialog with MRWE on MacOSX
 

gfxgfx
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!