>>Hilmar,
>>
>>Thank you. I think DoDefault is better for me! :P
>>
>>[]s
>
>It is much better in most cases, for the very reason you mention: possible changes in method names.
>
>Also, DoDefault() has a simpler syntax.
>
Hilmar/Rodolfo,
Actually, if the method names are changed, it doesn't matter if you use :: or DODEFAULT(). You lose your subclassed code.
VFP stores method code in the Methods memo field in the VCX. When you change the parent class, no changes are done to the memo fields of the subclasses. You are orphaning that code. The only way to access it at that point is to open the VCX as a table and manually change the reference, close the VCX and compile the class library.
One should never change a method name once it is in use (e.g. already subclassed). This is changing the interface. If you do this, you are going to break everything and give yourself a lot of work making things right.
In response as to what way to use. It doesn't matter now. However, before VFP 6, DODEFAULT() was buggy and the scope resolution operator had to be used. If you come from a C/C++ or Java background, the scope resolution operator may be more familiar to you. It is by far more self-documenting. You know exactly what code is being called.
It's simply a matter of preference.
Regards.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao