Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form return value problem
Message
 
 
À
07/04/2003 06:18:26
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00774567
Message ID:
00774651
Vues:
13
>After much soul-searching and coverage logging - I think I've found out what's going on (although I'm willing to be told otherwise).
>
>The unload line RETURN lReturnVal was not at form level, it was in a form class higher-up the class-heirarchy. Therefore when the form.unload contains DODEFAULT() (or no code), the parent class Unload() fires and returns a value only to the next level down the heirarchy. If that next level doesn't do anything with the value, it will be lost before the bottom-level form.unload() fires. (Hope this makes sense!)
>
>The solution is to use RETURN DODEFAULT() in the bottom-level form.unload() method.
>
>Thanks to all those who replied.

Hi Alan,

Your analysis and solution is correct.
* If in the subclass method you've only 
DODEFAULT() 
* is the same as 
DODEFAULT() 
RETURN
As you can see return value from the parent class code is lost in this case.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform