Microsoft KB Archive/113208

{| = BUG: @ ... GET List Box Does Not Redraw Properly =
 * width="100%"|

ID: Q113208

2.5x 2.60 WINDOWS kbprg kbbuglist

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5x, 2.6

SYMPTOMS
Under FoxPro for Windows, an @ ... GET List will not refresh properly after another window has been called in front of it.

CAUSE
The combination of the following two conditions causes this problem to occur:


 * The @ ... GET LIST items are from table or cursor fields.
 * The table or cursor that provides the fields for the @ ... GET LIST items is inadvertently closed.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION
The following cases will inadvertently close the original table or cursor:

 The environment of the second screen is saved and is different than the current environment. -or-  When the second window was generated, the Open Files and Close Files check boxes in the Generate Screen dialog box were selected. NOTE: You must choose the More button to see these check boxes. -or-  The second window reissues the SELECT statement, thereby overwriting the original cursor.

Steps to Reproduce Problem
This is an example of reissuing the SELECT statement in the second window, thereby overwriting the original cursor.

1. Create a new screen.

2. Place the following code in the Setup Code for the screen:

CLOSE ALL

CREATE TABLE places (name C(15)) INSERT INTO places (name) VALUE ("Reading") INSERT INTO places (name) VALUE ("London") INSERT INTO places (name) VALUE ("Oxford") SELECT * FROM places ORDER BY name INTO CURSOR QUERY 3. Using the List tool, add a list box to the screen, making it at least six rows in height. 4. For List Items, choose From Field and for the field name, type "Query.name" (without the quotation marks). 5. For the variable, type "m.choice" (without the quotation marks). 6. In the VALID clause, place the following code:

DEFINE WINDOW cover FROM 10,10 TO 20,30 SYSTEM FLOAT ACTIVATE WINDOW cover @ 3,5 GET m.choice ; PICTURE "@*HT Clear" ; DEFAULT 1 READ CYCLE RELEASE WINDOW cover * (The following SELECT statement closes the original cursor.) SELECT * FROM places ORDER BY name INTO CURSOR QUERY SHOW GETS 7. Generate and run the screen. 8. Double-click one of the names to activate the window "cover." After

placing the window over some portion of the list box that is empty, choose the Clear push button. 9. Repeat this step until the problem appears. It may be more likely to  appear if you select the second or third items in the list box. Additional reference words: FoxWin buglist2.50 buglist2.50a buglist2.50b buglist2.60 2.50 2.50a 2.50b 2.60 database KBCategory: kbprg kbbuglist KBSubcategory: FxprgGeneral Keywords         : FxprgGeneral kbbuglist Version          : 2.5x 2.60 Platform         : WINDOWS
 * }