2.50
WINDOWS
kbprg kbfixlist kbbuglist kberrmsg
The information in this article applies to:
- Microsoft FoxPro for Windows, version 2.5
SYMPTOMS
An object-level clause that refers to a window name defined by the
#WNAME generator directive causes the Screen Builder to generate two
lines of code for that clause.
The first line uses the random window name created by the Screen
Builder during program generation; the second uses the window name
defined by #WNAME.
STATUS
Microsoft has confirmed this to be a problem in FoxPro 2.5 for
Windows. This problem was corrected in FoxPro 2.5a for Windows.
MORE INFORMATION
Steps to Reproduce Problem
- Use the Screen Builder to create a new screen.
- From the Screen menu, choose Layout. Under Options, choose the
Code button. Then choose the Screen Setup Code button. Choose OK
twice to go to the Setup Snippet window.
- In the Setup Snippet window, type the following:
#WNAME somename
Close the Setup Snippet window to return to the Screen Design
window.
- Create an input (GET) field.
- In the Field dialog box, choose Input. In the Choose A Field Or
Variable text box, type "x" (without the quotation marks). Choose
OK to return to the Field dialog box.
- In the Field dialog box, under Clauses, choose the Valid button.
Verify that Procedure is selected in the Code Snippet dialog box.
Type the following code in the text box:
ACTIVATE WINDOW somename
Choose OK twice to return to the Screen Design window.
- Save the screen as TEST.SCX (assuming you do not already have a
file with the same name). When asked to "Save environment
information?", choose No.
- Generate TEST.SPR, and then close the Screen Design window.
- Run TEST.SPR.
- Press the TAB key once to activate the VALID clause.
The following program error is generated:
WINDOW 'SOMENAME' has not been defined.
- Choose Cancel from the Program Error message box.
The TEST.SPR file is automatically opened. Note that the ACTIVATE
WINDOW command appears twice. The first command uses the random window
name generated by the Screen Builder; the second uses the window name
"somename."
For example, the code will look similar to the following (the
generator-named window, "_qjm0tqik8," will be different, however):
ACTIVATE WINDOW _qjm0tqik8
ACTIVATE WINDOW somename