Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return multiple values from a form
Message
De
24/03/1997 16:19:33
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00025415
Message ID:
00025449
Vues:
31
>>How can I return more than one value from a form? Instead of
>>
>>DO FORM
TO retval
>>
>>I would like to
>>
>>DO FORM TO retval1, retval2, etc.
>>
>>I tried returning an array but only the first array item was returned.
>>
>>Thanks,
>>Ross
>
>You can use a public array and fill it in your form.
>No parameters, no returned values!
>
>BTW Your form must be MODAL. :-]

You're right - the form must be modal to use the TO clause, but there is an OOP way to do this. DEFINE an object that holds the variables you wish to pass back, then pass the object in using the WITH clause. Alter the properties in the object appropriately, then release the modal form. You don't even need the TO clause at that point, though I tend to use it as a logical to indicate whether the object was correctly updated.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform