Consultor Eletrônico



Kbase P46620: Enhancement for the System-Dialog get-file statement: Using
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   02/12/2003
Status: Unverified

SYMPTOM(s):

Enhancement for the System-Dialog get-file statement.

Using the options like logical parameters

CAUSE:

Enhancement request

FIX:

At the moment System-Dialog get-file statement has several option available: MUST-EXIST, SAVE-AS, ASK-OVERWRITE, USE-FILENAME, etc.
It has been requested to to choose these options at run time, so passing this as parameters. In other words:


System-dialog get-file cFilename
MUST-EXIST yes
SAVE-AS yes
ASK-OVERWRITE no
USE-FILENAME no.

That off course will be used like:

System-dialog get-file cFilename
MUST-EXIST logVar1
SAVE-AS logVar2
ASK-OVERWRITE logVar3
USE-FILENAME logVar4.

At this moment it is possible to achieve this by using a multiple IF statement like the above:

PROCEDURE mySystemDialog:
DEFINE INPUT PARAMETER cInput AS CHAR.
DEFINE INPUT PARAMETER MustExist AS LOGICAL.
DEFINE INPUT PARAMETER SaveAs AS LOGICAL.

IF mustExist AND SaveAs THEN
System-Dialog get-file cInput MUST-EXIST SAVE-AS.
ELSE IF mustExist AND NOT SaveAs THEN
System-Dialog get-file cInput MUST-EXIST .
ELSE IF NOT mustExist AND SaveAs THEN
System-Dialog get-file cInput SAVE-AS .
ELSE IF NOT mustExist AND NOT SaveAs THEN
System-Dialog get-file cInput .