PRB: VALID Behavior on @..GET Different in Version 5.0Last reviewed: August 11, 1997Article ID: Q158766 |
The information in this article applies to:
SYMPTOMSVisual FoxPro for Windows 3.0x and 5.0 invoke the VALID clause upon execution of a MODIFY MEMO command, whereas FoxPro for Windows 2.6x does not.
WORKAROUNDThe suggested workaround is to set a flag based on the version and test the flag prior to executing any Valid code.
STATUSThis behavior is by design.
MORE INFORMATIONSince Visual FoxPro for Windows is now object-oriented, the Valid event is firing properly. The cursor has indeed left the GET field; therefore, the MODIFY MEMO window now has the focus.
Steps to Reproduce BehaviorEnter and run the following program in both Visual FoxPro 5.0 (or 3.0x) and FoxPro for Windows 2.6x and notice that Visual FoxPro invokes the READ VALID clause, whereas FoxPro for Windows does not. On the Program menu, click Cancel to exit the program:
CLEAR ON KEY LABEL f4 DO modiproc * use a table that has a memo field such as the * \foxprow\tutorial\salesman.dbf or \vfp\samples\data\employee.dbf * execute the following code which creates a Readtest.dbf. CREATE TABLE ReadTest (char1 C(10), char2 C(10), memo1 M(4)) APPEND BLANK REPLACE memo1 WITH ; "notice that the Wait Window does display in Visual FoxPro" @ 2,2 SAY 'tab into the second get field, then press the F4 key' @ 4,2 GET char1 @ 4,20 GET char2 VALID testvalid() READ CLEAR READ FUNCTION modiproc MODIFY MEMO memo1 RETURN FUNCTION testvalid && char2 valid WAIT WINDOW "I am in the valid of the second get" RETURN(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Perry Newton, Microsoft Corporation Keywords : FxinteropPrevfox FxprgRead vfoxwin kbinterop Version : 2.5b 2.5c 3.0 3.0b 5.0 Platform : MACINTOSH WINDOWS Issue type : kbprb |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |