PRB: Method Code Not Returned Using Object Reference with GETPEM (195694)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q195694 SYMPTOMS
The GETPEM() function can be used to return the property values and event
or method program code for a given object at design-time. Although not
documented as being supported at run-time, this function does return
property values and event or method code at run-time.
However, when passing an object reference as the first parameter to the
GETPEM() function, an empty string is returned when querying for event or
method program code at run-time.
RESOLUTION
In order to retrieve the event or method code at run-time using the
GETPEM() function, the first parameter must specify the class name rather
than a reference to the object. If the class name is not known, the
object's Class property can be passed as follows:
GETPEM(oObject.Class, "Init")
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 12/10/1999 |
---|
Keywords: | kbOOP kbprb KB195694 |
---|
|