BUG: READ DEACTIVATE Runs When BROWSE Called From VALID of GETID: Q129229 The information in this article applies to:
SYMPTOMSIn a READ with a DEACTIVATE clause, calling a BROWSE from the VALID clause of a GET triggers the READ DEACTIVATE clause.
CAUSEAs the active window changes, the READ DEACTIVATE is executed. In FoxPro version 2.x, the READ DEACTIVATE is not called when the BROWSE is executed from the VALID clause of the GET.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
RESOLUTIONAn alternative is to modify your code to use a Form and a Grid instead of the BROWSE command. The Grid object is part of the form and interacts with all of the objects in a form. Another option is to code a special case in the READ DEACTIVATE clause. For example, you could set a flag when the BROWSE is first activated. In the READ DEACTIVATE, verify the value of the variable, and if the BROWSE has been called, RETURN .F. from the READ DEACTIVATE. The following sample code illustrates this method:
MORE INFORMATIONThis illustrates a behavioral difference between FoxPro versions 2.x and Visual FoxPro version 3.0 for Windows. Because the BROWSE window is different from the READ window, the behavior exhibited in Visual FoxPro for Windows seems more logical. For more information about differences between FoxPro 2.x and Visual FoxPro version 3.0, search for "Differences Between FoxPro 2.6 and Visual FoxPro" using the FoxPro Help menu. Additional query words: grid kbvfp300 kbvfp500 kbvfp600
|
Last Reviewed: October 22, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |