Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning Parameters from a Form
Message
De
28/05/1997 19:05:46
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
À
28/05/1997 16:43:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00033927
Message ID:
00033956
Vues:
37
>I know how to pass PARAMETERS to a form, but how Do I RETURN PARAMETERS from form after ThisForm.Release().
>I would like to avoid public variables or any reference to outside sourse.
>Thanks.....

What I have is custom 'parameter' class that I use to pass parameters. The class has one property which is an array. I create an instance of this object just before calling a form and I pass this object as the only parameter required to the form. With an array, the object can store any number of parameters. My forms have an oparm property which is either NULL or a reference to a parameter object. These values are accessable in the form and preserved after the form is destroyed. After returning from the form I do what I need to with the values and release the parameter object.

There is an 'idea' out there that says you should not pass more than one or two parameters to any object/method etc. Pass an object reference instead. I tend to agree though I do have methods that are quite willing to accept 10 or more parameters!

Bob
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform