PRB: Protected Property Cannot be Changed by Objects in a ClassLast reviewed: November 14, 1997Article ID: Q155261 |
3.00 3.00b | 3.00b
WINDOWS MACINTOSHkbprg The information in this article applies to:
SYMPTOMSAn Object that was added to a class at design time will not be able to modify a protected property or method of the class. If it tries, it will fail with the following error:
"Property is not found" WORKAROUNDIn order to allow an object in a class to modify protected properties of a class, you will need to create public methods for your objects to call and then have the method change the protected properties.
STATUSThis behavior is by design.
MORE INFORMATIONProtected properties added to a container class in Visual FoxPro become part of your container class. However, objects that are added to the container in the Class Designer are not considered to be part of the container class but rather external objects sitting in the container. Because of this, protected properties are encapsulated in the container class and can not be seen by objects sitting in the container. This behavior can be confusing because the class designer gives the appearance that the container and all the objects in it are part of the container class.
Steps to Reproduce Behavior
REFERENCESFor more information about how inheritance affects protected properties, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q128633 TITLE : How Inheritance Affects PROTECTED Methods and Properties |
KBCategory: kbprg
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |