PRB: GETPEM Function Doesn't Work on Object Contained in ClassLast reviewed: January 24, 1996Article ID: Q141632 |
The information in this article applies to:
SYMPTOMSUsing the GETPEM() function to return any property, event, or method from any object contained within a class doesn't work unless that object is a class (other than the object's base class) unto itself.
CAUSEWhen the GETPEM() function receives a class name as its first parameter, it only retrieves the event and method code associated with this class. It does not return the program code of any contained object.
RESOLUTIONTo examine the properties, events, or methods of any contained object of a parent class, use the Class Designer or Class Browser.
STATUSThis behavior is by design.
MORE INFORMATIONThe GETPEM() function is new to Microsoft Visual FoxPro version 3.0b. GETPEM() requires two arguments. The first argument should refer to either the object or class that contains the property, event, or method. The second argument should refer to the property, event, or method.
Steps to Reproduce Behavior
GETPEM(_Screen.ActiveForm.Command1,"Click")On the right side of the Debug window, you will see "", but you know there is a ThisForm.Release command. Because the command was put in at the class level, the only thing that is returned with the GETPEM() function is the code that was inserted at the object (or form) level, which is a null string. There is no syntax that can be used with the GETPEM() function that can return the ThisForm.Release code from the Click event of the command button in the above example. However, if a class were created based on the command button (for example, mybutton) and the Click event at that class level contained code, then it would be possible to use this:
GETPEM("mybutton","click") |
Additional reference words: 3.00b VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |