Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Thisform.aMyArray by reference
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00261669
Message ID:
00262378
Vues:
18
PMFJI Paul, but if the five array properties and the GetServerFilesFromDir() method are in the same form you could just pass the name of the array and use macro substitution in the method like so:

Thisform.GetServerFilesFromDir("aServer1","C:\MyApp\SERVER1\")

In GetServerFilesFromDir.Init
PARAMATER mcarray, mcdirectory

Reference array like so: ThisForm.&mcarray(1)=.F.

HTH


>>Hi Paul,
>>
>>I'm confused, your first post stated the arrays were already properties of the form.
>
>Hi:
>
>Here is the run down. I have five UNIX servers that I need to connect to. Using ProComm, I connect to each of the five servers and download some data files into C:\MyApp\SERVER1, C:\MyApp\SERVER2, etc. All of the data files are the same structure, but the number of files will be unknown. My final goal is to merge all of these data files into a VFP database. That is where my five array properties come in. My five arrays contain the file names of all the files that are in SERVER1, SERVER2, etc. directories.
>
>For example:
>
>Thisform.GetServerFilesFromDir(@Thisform.aServer1,"C:\MyApp\SERVER1\")
>
>will put all the file names into the array
>
>My original problem is that I cannot pass an array using @Thisform.aServer1. I need to perform a ACOPY before and after the call to get the files.
>
>For example:
>
>LOCAL ARRAY laJunk[1]
>DIMENSION laJunk[ALEN(Thisform.aServer1,1),ALEN(Thisform.aServer1,2)]
>=ACOPY(Thisform.aServer1,laJunk)
>Thisform.GetServerFilesFromDir(@laJunk,"C:\MyApp\SERVER1\")
>DIMENSION Thisform.aServer1[ALEN(laJunk,1),ALEN(laJunk,2)]
>=ACOPY(laJunk,Thisform.aServer1)
>
>I do this for each of the five arrays.
>
>--Paul
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform