Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running both the class method code and the userdefined
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00041688
Message ID:
00041820
Views:
37
Jim, That's why VFP5 has DoDefault()! If you're using ALL the code up the line, or NONE of the code except what you put in the method, it works smoothly.

Barbara

>Barbara,
>
>Yes, I saw Jim B's after I wrote.
>
>Classing it twice seems to be the answer. But it was actually some code in MaxFrame which got me thinking originally about this very question. In some cases there you will find the subclass invoking the parent's method inaddition to its own.
>
>Cheers,
>Jim N
>
>>Hi, Jim. Arnon seems to be taking the rest of the day off, so I'll give it a try. First, read Jim Booth's message on this thread (7/26/97, 12:59) because he makes the point that when you subclass you need to decide whether you want a grandparent/parent/child subclass or have a second class at the PARENT level.
>>Writing code in a method in a sub-class is done for 2 reasons: 1) To REPLACE the parent's code and 2) To ADD to the parent's code. If you are using a class in several places and sometimes want 1) and sometimes 2), CLASS IT TWICE!!
>>
>>Another idea is one I picked up from Visual MaxFrame: Add a method called "ShellAdditionalMethod" for any method. Put a call to this method in your PARENT (top level) class. If it's blank, nothing happens, but if you WANT code that doesn't overwrite the code in the parent class' method it's easy to put it in.
>>
>>HTH
>>Barbara
>>
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform