Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you pass an array to a Form Class Init method?
Message
From
14/10/1997 07:51:09
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, United States
 
 
To
13/10/1997 22:20:27
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00054387
Message ID:
00054419
Views:
33
>>Anyone know how to do this?
>>I can do the following
>> do form frmTest with aArray
>>But if I try it with a class, VFP returns error
>>saying it is not an array.
>> obj = crea('frmTestClass', aArray)
>>Is there a way to get around?
>
>The proper way is to pass an object. Define that array as an object of the form and pass that object instead.

Alternatively, make sure that you're passing the Array by referance and not by value. Otherwise, you'll only be looking at the first element, which is why you'll get a 'Not An Array' error.
Matt McDonnell
...building a better mousetrap with moldy cheese...
Previous
Reply
Map
View

Click here to load this message in the networking platform