BUG: SHOW GET Does Not Refresh Number of ElementsID: Q134638 The information in this article applies to:
SYMPTOMSA screen converted from a previous version of FoxPro to a Visual FoxPro form doesn't display added items when both of the following conditions are met:
CAUSEThe converter defines the list box with a "number of elements" property. That definition is exercised in the LOAD event of the form or formset. Visual FoxPro's converter does not insert the appropriate command to refresh the list box's "number of elements" property when the array size changes.
WORKAROUNDThe VALID code of the converted command button adds an element to the array, and executes a SHOW GETS command. Immediately before the SHOW GETS command, insert a command to update the number of elements as in this example:
STATUSMicrosoft 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 INFORMATIONSteps to Reproduce Problem In FoxPro version 2.6a for Windows, create a screen that has a list box and two command buttons, as follows, using the Screen Builder: 1. On the File menu, click New. Then select the Screen option, and click 2. On the Screen menu of the Screen Builder, click Layout. Enter the name
3. On the Screen Design toolbar, select the Command (push) button tool, and
4. Click the VALID button. In the Code Snippet dialog box, choose the
5. Select the List tool, and place a list box on the screen. In the List
6. Place another command button on the screen. In its push button dialog
7. On the File menu, click Save As, and save the file as Addu.scx.
8. On the Program menu, click Generate to build a source code program 9. In the Command window, enter the following command to run the program:
10. Click the Move=> button, and observe the addition of the word "Three"
Close FoxPro for Windows, start Visual FoxPro for Windows, and follow these
steps:
1. In the Command window, enter the following commands, modifying them to 2. In the Converter dialog box, click the Continue button to do a
3. Enter the following command in the command window to run the new form:
4. Click the Move=> button, and observe that the word "Three" does not
5. Enter the following command in the command window:
6. Click the body of the form. Then click the right mouse button and
7. Click the Move button to select it, then click the right mouse button
8. In the Property sheet for the command button, locate the Valid method
9. Enter the following command in the Command window "do form addu," and
Additional query words: kbvfp300 kbvfp500 kbvfp600
|
Last Reviewed: August 10, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |