Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple class question
Message
 
 
To
08/01/1999 22:41:15
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00173492
Message ID:
00174360
Views:
29
Kenneth,

I mostly use ::, I rarely find it necessary to change what something is derived from so having a hardcoded ParentClass name isn't a problem for me. Plus it keeps my code more C++ like which another language I use frequently. I do find DoDefault() to be easier to use when overridding code of composite classes.

There is also a bug in VFP (I've not yet tested to see if it still occurs in VFP6) where if you have a grandchild class that uses DoDefault() to an empty ParentClass method you end up getting the BaseClass method executing twice. This is only significant in cases like TextBox.KeyPress where the behavior can be "observed" to know it's executed twice. If you look at the Quicken txtDate class on my website under Q&A, OOP there is more detail about the problem.

>Occasionally I use the :: Scope Resolution operator. How does this differ with DoDefault()? Did I miss something here?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform