Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dodefault() in custom method
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00578747
Message ID:
00578756
Vues:
33
>>Hi everyone,
>>
>>I've spent about an hour debugging some problem and want to share my findings in case, somebody would be in this trouble. I have a class btcc_group, which is based on another class btcc_container. In the btcc_group class I created a method called btcc_ListSelect. In this method I placed some code and this code ended by dodefault(). This dodefault() was a problem, since I don't have this method in the parent class. Spent a long time working on this problem, since custom Error Handler interfered the process of debugging.
>>
>>Watch out! :)
>
>Nadya;
>
>Interesting! Yes, I can see why there would be a problem. I have placed code before a DoDefault() in the child object required by the parent, and then additional code needed by the child after the DoDefault().
>
>Too bad we cannot call This.Child.MyMethod() just before the DoDefault() :)
>
>Anyway, it is always good to hear what someone has found in case we get bitten in the future! :)
>
>Tom

Yes, this is an interesting and hard to find problem. If child class has method and parent class doesn't have this method, putting dodefault() in any place in the child class method code will lead to this error. In my case it was hard to find, because custom Error Handler was invoked and it returned a message, which didn't contain enough information to find this problem.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform