Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with child class
Message
From
13/12/2006 09:43:02
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
13/12/2006 09:25:56
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01177142
Message ID:
01177148
Views:
17
>Situation:
> Parent Class Recal Method(param1) - has code
> Child Class Recal Method(param1) - has code which overrides parent class
> Grandchild Class Recal Method(param1) - has no code so calls child class recal
>For five years the Grandchild class Recal Method automatically called the Child Class Recal method. Yesterday, it stopped working. Tracing thru the app when the grandchild class recal method was hit, it just went to the next line. I thought that I must have somehow inadvertantly lost some code in the grandchild class, so I looked back at older copies and discovered the older working versions of the code are EXACTLY the same as the current version which no longer works. I was able to restore the code to working order by putting the line DoDefault(param1) in the grandchild class. Can anyone explain this to me? There was absolutely nothing ( no spaces, no text) in the grandchild class other than a parameter. The parameter has always been there.

If you open a code window for editing, vfp 6+ adds the parameter line from the inherited code. It looks like the parameter line was always there.

If however, you edit in the window and save the contents (the parameter line), by even hitting enter, the default behavior will no longer fire without the dodefault().

I suggest you never had anything in the subclass at all, but now you do and that's why the dodefault() worked. I recommend you remove the contents of the window via the property sheet - reset to default.

HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform