Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Thisform.aMyArray by reference
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00261669
Message ID:
00262379
Views:
19
Hi Paul,

I think I got it now. What you can do is pass the property name as a string and macro expand it in the method. ex:

Your form has the 5 array props aMyServer1, aMyServer2,...aMyServer5.

Call the method with:

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

Now in the method you can do something like this:
lParameters tServerName, tFileLocation

cServer = "ThisForm." + tServerName

&cServer[1] = 'Hog'
&cServer[2] = 'Cow'
&cServer[3] = 'Goat'

for cAnimal = 1 to alen(&cServer)
    ? &cServer[ cAnimal ]
endfor
Or whatever the method needs to do. That should eliminate having to use the acopy.

hth
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform