Microsoft KB Archive/183895

= FIX: Problems With @GETS and CLEAR GETS If No READ =

Article ID: 183895

Article Last Modified on 3/23/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a

-



This article was previously published under Q183895



SYMPTOMS
An @...GET text box control does not remain visible.



CAUSE
This is known to happen in Visual FoxPro 5.x when the @...GET is cleared with the CLEAR GETS command before it has been activated with a READ command.



RESOLUTION
One possible resolution is to issue a READ TIMEOUT .001 after the @...GET prior to the CLEAR GETS command. Please see the sample program in the Steps to Reproduce Behavior section below for an example.

A better solution would be to use Object-Oriented Programming (OOP) style programming with a Text box control. Implementing this workaround would depend on the situation.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This has been corrected in Visual FoxPro 6.0.



MORE INFORMATION
Prior to Visual FoxPro, @...GET controls activated by a READ were the primary method that a programmer used in a user interface for users to enter information into a table (in addition to a BROWSE window) or a memory variable. The @...GET controls included text boxes, edit boxes, combo boxes, list boxes, and other controls. The @...GET controls need to be activated by a READ command before they can be used to enter data.

The CLEAR GETS command releases all pending @...GET controls.

Steps to Reproduce Behavior
The program code below can be used to reproduce the problem.   Enter the following program code into a new program file and save it with the name GetProb.prg: CLEAR x="This is a test" y="Test 2" @ 5,5 GET x     *    READ TIMEOUT .001     && Uncomment this for a workaround. CLEAR GETS @ 7,10 GET y     READ   Run the program with the following command in the Command window: DO GetProb.prg  When you notice that only one of the @...GETs stays visible on the Visual FoxPro desktop, press TAB or ENTER to clear the READ and return to the Command window. Uncomment the READ TIMEOUT .001 command and rerun the program. Note that the first @...GET displaying "This is a test" remains visible.

Additional query words: kbvfp600fix

Keywords: kbbug kbfix kbpending KB183895

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.