Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning a value from a form in a class
Message
De
20/06/2000 14:56:50
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00380150
Message ID:
00382327
Vues:
23
All,

private vars are an exceptionally bad idea - for much of the same reasons that publics are - plus - if decoupling is a goal - there is nothing that breaks it worse than sharing live variables.

I would suggest forgetting that the PRIVATE declaration even exists. I have all but fired programmers when I see a PRIVATE in their code...

Ken

>Randy:
>
>Declare a variable PRIVATE in the calling program. In the UNLOAD method of the form, set the variable to some value. The value will be available when you return to the calling program. Note that this only works with modal forms.
>
>PRIVATE lRetval
>lRetval = .F.
>loForm = createobject('myform')
>loForm.show()
>
>if lRetval = .T.
> *-some action
>else
> *- some action
>endif
Ken B. Matson
GCom2 Solutions
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform