Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you pass an array to a form?
Message
De
05/08/1998 11:05:38
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
05/08/1998 10:57:41
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00124072
Message ID:
00124091
Vues:
25
>>>I want to pass an array to a form by reference, have the form change/add to the array and have the calling prg seen these changes to the array.
>>>
>>>In my main.prg I ;
>>>
>>>DIME x[1]
>>>DO FORM mymodalform WITH x
>>>
>>>In the mymodalform.scx, I want to change/add to the "x" array and have the main.prg seen these changes when the modal form is closed.
>>>
>>>Thanks,
>>>
>>>Jerryt
>>Jerry,
>>You could directly call myform w/o any parameter unless you declared your array local.
>>Cetin
>
>
>I can pass an array to a form, change/add the array in the form's INIT(), then close the form and the array is changed in the calling program.
>
>My problem is that I can't seen a reference to the passed in array in the form except in the form's INIT().
>
>After I pass in the array, how can I get to it from another object or method in that form?
>
>Thanks,
>
>Jerryt
Jerry,
That's why I said just call myform w/o parameter and make array visible to all form PEMs. If you pass it as a parameter it would be scoped to init and thus you would need a form property (an array) to hold the passed parameter to be able to change within another method of form.
dim aX[1]
do form myform
* Now myform PEMS can access aX
* ie: a button.click on myform
dimension aX[5]
for ix=1 to 5
  aX[ix] = ix^2
endfor
thisform.release
* On return disp memo like aX
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform