Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP7 Events
Message
 
To
02/01/2001 16:59:12
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00458642
Message ID:
00458902
Views:
31
It is mostly a matter how parent classes are designed (I agree with Fred and Trey here). Also in many cases I use the hook methods anyway, (say, OnBeforeSave() and OnPostSave() so the custom code for the class instance is located there without the need of using DODEFAULT(). Not to mention a greater flexibility for the future changes.
As others mentioned, you might be just using NODEFAULT for your approach instead of DODEFAULT() with the current one.


>Hi!
>
>You mean you prefer to call dodefault() every time rather that it being called by default?
>
>Ok, let me put it this way, what is the % of dedefault() you have in your child's events/methods?
>
>Sarosh
>
>>>Hi!
>>>
>>>Does any one know if in VFP7 the default behavior of processing Events/Methods has changed from "Override" to "Extend"?
>>>
>>>What I mean by that is, the default behavior in VFP6 is to Override the parent's Event/Method by default. If we want to Extend the behavior we have to execute "DoDefault()" every time in every child's Event/Method if we want the parent's Event/Method to fire, which I think is really a pain in the a##.
>>>
>>>I think we should have a menu option (or some other way) to specify whether we want to Extend the parents behavior or Override it.
>>>
>>>i.e. Every Event/Method should have a property that could be either “Extend” or "Override" and "Extend" should be the default.
>>>
>>>What are your thoughts on this?
>>>
>>>
>>>Sarosh
>>
>>No, this default behaviour didn't change. IMHO if it did, it would break too much code in existing apps. Also I think that extra properties for every method will overburden a class and make it difficult to maintain. Personally, DODEFAULT() works just fine for me as it allows me to run the parent class code where I want it to fire.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform