FIX: Inherited Code Fires Twice with DODEFAULT() (158250)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
This article was previously published under Q158250 SYMPTOMS
When the DODEFAULT() function is used in a subclass method, it executes a
method in the parent with the same name. When the parent has no method with
that name, it then looks to the grandparent for that method. If it exists,
it is executed. If the grandparent has a NODEFAULT() function, the code
gets executed twice.
CAUSE
The parent in the above situation executes the code of the grandparent as
its own. Because the grandparent has a NODEFAULT() function, the parent
calls the method of the grandparent again.
WORKAROUND
To work around this problem, place a method that has the same name in the
parent. Place a DODEFAULT() command in the parent method.
STATUS
This behavior is by design in the products listed at the beginning of this
article. This behavior does not occur in Visual FoxPro 5.0a
Modification Type: | Major | Last Reviewed: | 12/11/1999 |
---|
Keywords: | kbbug kbprogramming kbvfp500aFIX KB158250 |
---|
|