Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP7 Events
Message
From
02/01/2001 17:20:28
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00458642
Message ID:
00458681
Views:
33
Actually, Sarosh is describing how powerbuilder works. You have to put a line of code in there if you don't want it to call the parent automatically. Then of course, you can call the parent code later if you want.

But, seems like 6 of one, 1/2 dozen of the other. As long as you know how it works and code accordingly.

BOb


>(snip example that demonstrates my point)
>
>>In most cases we want the parent's code to execute first (that's why we subclassed it!) and that's why I think Extend should be the default processing behavoir - it's much cleaner.
>
>I disagree, a majority of the time *I* do *NOT* want the parent code to execute first, but that's all a matter of how your classes are designed. I think having to specify how it's handled external to the code would be even more of a hassle (and even more unclear). I see nothing wrong with the way it is, that I have full control of *when* the parent code executes. I still like it just the way it is.
>
>>>>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
>>>
>>>OK, then tell me when would you have the parent method code execute? Before your code, after your code, in the middle of your code? THAT'S why we have the DODEFAULT(), so we can control when that code executes (if at all).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform