Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass form's array
Message
De
04/09/2000 11:10:32
 
 
À
03/09/2000 22:44:12
Ng Man Kit
Genesis Systems Ltd.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00412199
Message ID:
00412251
Vues:
17
>Hi Trey,
>
>Is there any convenience way to do that? I am so tried to handle arrays like this in my form. There are five arrays in my form and I scan these arrays for a value using a 3rd party library frequently.
>
>Thanks for your help!
>
>Geoffrey

Are you passing the array to this 3rd party tool?
In that case, my 1st suggestion is what you'll have to do.
Why not write a form function that will return an array for you to pass? Like:
** form.GetArray() method
LPARAMETERS taArray, tcFormArray
EXTERNAL ARRAY taArray
DIMENSION taArray(ALEN(this.&tcFormArray,1),ALEN(this.&tcFormArray,2))
ACOPY(thisform.&tcFormArray, taArray)
Then use it like so:
** some button Click()
** given: 
** form.MyArray[1,1]="Hello"
** form.MyArray[1,1]="World"
LOCAL laArray(1)
thisform.GetArray(@laArray,"myarray")
ACTIVATE SCREEN
DISPLAY MEMORY LIKE laArray
** output: 
** LAARRAY Local A 
** (1,1) C "Hello"
** (1,2) C "World"
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform