FIX: Control Class in Control Not Shown in Control ArrayID: Q142194 3.00 3.00b WINDOWS kbprg kbbuglist kbfixlist The information in this article applies to:
SYMPTOMSWhen one control class is added to another control class, the AMEMBERS() function and the Controls array do not see the control class that was added. This occurs whether the classes are created programmatically or visually.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0 for Windows.
MORE INFORMATIONThe following code creates two control classes: Ctl and Subcontrol. The program adds the Subcontrol class to the Ctl class. The ADD OBJECT method also adds two command buttons and a two-page pageframe to the Ctl class. Therefore, Ctl class contains the Subcontrol class, two command buttons, and a pageframe. The object positions referenced in the class definitions only apply if the class is created visually. The code example uses the AMEMBERS() function to place properties, procedures, and member objects into a memory variable array named atest. Because the Printmembers function is part of the Ctl class, it should have access to all the objects within that class. However, the AMEMBERS() functions lists all the objects in class except the subclass object. The AMEMBERS() function should have to access to all the members of its own class.
Steps to Reproduce Problem1. Create a program called Test.prg, and add the following code:
2. In the Command window, type each of the following commands on a separate
The array atest contains elements representing the command buttons and the
pageframe objects that appear listed on the desktop. However, the
Subcontrol class object is not listed. The AMEMBERS() functions does not
find the Subcontrol object because it was added as a control. This causes
the error message "Property Controls is not found." If the "Ignore" button
is pressed, an "Unknown member SUBCONTOL1" message is displayed.
KBCategory: kbprg kbbuglist kbfixlist KBSubcategory: FxprgGeneral VFoxWin buglist3.00 buglist3.00b fixlist5.00 Additional reference words: 3.00 3.00b
|
Last Reviewed: February 23, 1997 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |