Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning array from Form
Message
De
29/08/2014 03:20:25
 
 
À
28/08/2014 01:51:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01606569
Message ID:
01606709
Vues:
52
>>Just to show how rusty my VFP is:
>>
>>How should I return an array from a (modal) form. Calling line this:
DO FORM xxxx WITH SourceData TO ReturnData
I know I have to return it from the Form.Unload() but.....?
>>
>>FWIW I can make the array local or a property of the form - but I think it needs to be a property ?
>
>You cannot return an array. If you do it only returns the first element of the array
>
>As mentioned, use an object
>
>do Form xx to tt
>
>
>Unload
>
>local obj, nElements
>obj = createobject('empty')
>nElements = 24
>
>= addproperty(m.obj, 'aa[m.nElements]')
>local i
>for i = 1 to m.nElements
>	obj.aa[m.i] = m.i
>endfor
>
>=dodefault()
>
>return m.obj
>
Thanks both. Ended up passing the object to the calling form (since it basically modified an existing array) so there was no need to pass anything back...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform