Project

General

Profile

Bug #12038

SYSTEM-DIALOG GET-FILE: DEFAULT-EXTENSION patterns and USE-FILENAME paths

Added by Greg Shah about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:

History

#1 Updated by Greg Shah about 1 month ago

SYSTEM-DIALOG GET-FILE: DEFAULT-EXTENSION patterns and USE-FILENAME paths

Project: User Interface

Problem

The gap marking records SYSTEM-DIALOG GET-FILE as Full / Full (R) with the detail "DEFAULT-EXTENSION, USE-FILENAME, RETURN-TO-START-DIR and CREATE-TEST-FILE are passed to the client but not honored by the GUI file chooser". That is partly stale:
  • DEFAULT-EXTENSION is honoured. FileDialogImpl.setSelectedPath appends the extension when the chosen name has no dot.
  • USE-FILENAME is honoured. ThinClient.chooseFile calls setSelectedPath before showing the dialog, and the dialog pre-fills its file name field from it.
  • RETURN-TO-START-DIR is ignored, but the FWD dialog never changes the process's working directory, so FWD always behaves as if it were given.
  • CREATE-TEST-FILE is stored but not used, so the dialog does not check that the directory is writable; a failure is reported when the file is written instead.
Two cases are not known to match OpenEdge, and both are common:
  1. DEFAULT-EXTENSION is often written as a pattern rather than an extension, for example DEFAULT-EXTENSION "*.csv". FWD appends it as given, producing name.*.csv. What OpenEdge produces is not established.
  2. USE-FILENAME with a variable holding an absolute path. FileDialogGuiImpl.validateSelection builds the result from the current directory and the typed text, which may give a wrong path when the pre-filled value is already absolute.

Work

  1. Establish on OpenEdge the result of DEFAULT-EXTENSION given as "*.ext", ".ext", "ext" and "*.*", with and without SAVE-AS, when the user types a name with and without an extension.
  2. Establish on OpenEdge the result of USE-FILENAME with a relative name, an absolute path, and a path in a directory other than INITIAL-DIR, when the user accepts the pre-filled value unchanged.
  3. Make FWD match both.
  4. Decide whether CREATE-TEST-FILE should test that the directory is writable, as OpenEdge does, and implement it if so.
  5. Correct the gap detail to name only what is really missing.

Testcases

With an OpenEdge baseline: each combination above, checking the returned file name exactly.

Also available in: Atom PDF