FIX: #REGION Directive Not Behaving Properly in FoxPro 2.6xID: Q117352
WINDOWS | MS-DOS
The information in this article applies to:
SYMPTOMSIf you use the #REGION compiler directive in conjunction with the REGIONAL command in order to use a variable that has the same name but has different values in a single screen, the #REGION directive does not work correctly.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual FoxPro 3.0 for Windows.
MORE INFORMATIONThe REGIONAL command creates regional memory variables and arrays. Memory variables or arrays with identical names can be created without interfering with each other when their values are protected within a "region." Regional variables are similar to private variables. Regional variables are declared before they are used in a screen. A region (0 through 31) is created with the #REGION compiler directive. Then the command REGIONAL <variable name> is used after the #REGION directive.
Steps to Reproduce Problem1. Place the following code in the Setup code section of a screen:
2. Create a push button with the following code in the VALID clause:
3. Create another push button with the following code in the VALID clause:
When you click the first push button, the text "This is region 1." should
appear. Instead, the text "This is region 2." appears because GENSCRN does
not generate the #REGION directives properly--the variable "abc" is
recognized only once with the text that was assigned to it last. The same
code works correctly in FoxPro version 2.5 for Windows and MS-DOS.
Additional reference words: FoxDos FoxWin VFoxWin 2.60 2.60a fixlist3.00 buglist2.60 buglist2.60a KBCategory: kbprg kbfixlist kbbuglist KBSubcategory: FxtoolSbuilder
|
|
Last Reviewed: May 14, 1998 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |