SYSTEM-DIALOG - Forum - OpenEdge Development - Progress Community
 Forum

SYSTEM-DIALOG

This question is not answered

11.7.3

Should this not open the system dialog in the EDI folder? I have verified using DirectoryInfo that the directory does exist. However, the system dialog does not open in the folder that I think it should.

In 11.4 the same code works just fine.

DEFINE VARIABLE cFileName      AS CHARACTER                  NO-UNDO.
DEFINE VARIABLE cBasefile         AS CHARACTER                  NO-UNDO.
DEFINE VARIABLE cEdifolder       AS CHARACTER       NO-UNDO.
DEFINE VARIABLE lOkay              AS LOGICAL        NO-UNDO.
DEFINE VARIABLE oDirectoryInfo AS CLASS System.IO.DirectoryInfo NO-UNDO.
  
FILE-INFO:FILE-NAME = ".". 
ASSIGN
    cEDIFolder = FILE-INFO:FULL-PATHNAME + "\EDI"
    cBaseFile  = "*.xml".
   
oDirectoryInfo = NEW System.IO.DirectoryInfo (cEdifolder).
MESSAGE "oDirectoryInfo:EXISTS=" oDirectoryInfo:EXISTS
VIEW-AS ALERT-BOX.
           
SYSTEM-DIALOG GET-FILE cFileName
 INITIAL-DIR cEDIFolder
    FILTERS    "Invoices (*.xml)"  cBaseFile
    MUST-EXIST
    TITLE      "Select XML Invoice"
    RETURN-TO-START-DIR
    USE-FILENAME UPDATE lOkay.
All Replies
  • It works for me in 11.7.3, 11.7.4, and 12.0. There weren't any changes to SYSTEM-DIALOG GET-FILE in 11.7.3. There may be some factor other than OpenEdge involved in the instance where it doesn't work for you.

  • Hmm, not sure. I have confirmed this when running from PDSOE on a Windows 10 PC as well as when running on a Server 2016 PC with ENT DB license.

    The initial directory that opens is always the last to open with the windows file dialog.

    If I use the .NET OpenFileDialog it works just fine.

    In your environment are you running Windows 10 or Server 2016?