Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing an object using a variable for the object na
Message
De
15/08/2001 21:49:48
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
15/08/2001 16:04:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00544237
Message ID:
00544499
Vues:
17
Linda-

>Thanks Mike and Nancy, but ACOPY doesn't work if your array reference isn't working!

I'm with Steve. As I mentioned in my first response, your goal isn't clear to me.

You have an object that you want to add a property to that will be an array? It looked to me in your original code that you were adding an object not an array. Could you first clarify that point?

The way you make an array property is either in code with
DEFINE CLASS MyClass AS CUSTOM
DIMENSION aMyArray[1]
ENDDEFINE
Or visually, by opening your class, selecting Class|New Property, the put in the aMyArray[1]

Then you can easily ACOPY() the array.
LOCAL loMyObject, laTempArray[1]
loMyObject = NEWOBJECT( 'MyClass', 'MyClass.PRG' )
DIMENSION loMyObject.aMyArray[7]
loMyObject.aMyArray[1] = "Monday"
loMyObject.aMyArray[2] = "Tuesday"
etc.
ACOPY( loMyObject.aMyArray, laTempArray )
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform