Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing an object using a variable for the object na
Message
From
15/08/2001 21:49:48
 
 
To
15/08/2001 16:04:48
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00544237
Message ID:
00544499
Views:
24
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 )
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform