The information in this article applies to:
- Microsoft FoxPro for Windows, versions 2.5x, 2.6x
- Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6x
- Microsoft FoxPro for Macintosh, versions 2.5x, 2.6a
- Microsoft FoxPro for UNIX, version 2.6
SUMMARY
When you create a list popup in FoxPro using the PROMPT FILES clause, the
entire path is not stored in the variable.
MORE INFORMATION
To have the entire path returned, do the following:
- In the setup code of the screen, define a popup with the PROMPT FILES
clause. For example:
DEFINE POPUP popfile PROMPT FILES LIKE *.dbf
- In the setup code, define as character the variable that the list will
be using. Also, define a character variable to which the entire path
will be stored. For example:
var='' && List variable
entire='' && Variable for entire path
- To create the list, do one of the following, depending on which platform
you are using:
- In FoxPro for MS-DOS, position the cursor on the screen in the
place where you want the list to appear. From the Screen menu,
choose List, select From Popup, and type "popfile" (without the
quotation marks) as the popup name. In the Variable box, type
"var" (without the quotation marks).
- In FoxPro for Windows, click the list tool, then click in the
Screen Design window where you want the list to appear and drag
the list to the desired size. The List dialog box will open. In
the dialog box, select From Popup, and type "popfile" (without
the quotation marks) as the popup name. In the Variable box,
type "var" (without the quotation marks).
- In the Valid procedure, type the following code:
entire=PRMBAR("popfile", 2)+var
- The variable called "entire" now contains the entire path to the
selected file, as well as the filename. To verify this, include the
following statement after the command given in step 4:
WAIT WINDOW entire
|