Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I return an array from a form?
Message
 
À
18/01/1999 05:21:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00177095
Message ID:
00177515
Vues:
37
No.

What I do is instance a Custom Class and return the object. So, if I have three values I need to return from the form, I would do something like:

Thisform.o = createobject("custom")
With Thisform.o
.addproperty("value1")
.addproperty("value2")
.addproperty("value2")
EndWith


Then, with all of the properties set based on entry in the form, you would have this code in the Unload()

Return This.o

>Hi everybody!
>
>Is there any way to return an array from a form?
>For example, I call a form with...
>
>local laArray[10],laRetArray[10]
>do form Form1 with laArray to laRetArray
>
>... and in its Init event do the following:
>thisform.aItems = taParamArray
>
>( aItems defined as aItems[10,0] )
>When I, in form's Unload event trying to
>...
>...
>return thisform.aItems
>
>it fills the laRetArray with first item's value
>
>Any suggestions?
>
>TIA.
>
>Uri.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform