Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you pass an array to a Form Class Init method?
Message
De
14/10/1997 07:51:09
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
 
 
À
13/10/1997 22:20:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00054387
Message ID:
00054419
Vues:
38
>>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...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform