General information
Category:
Object Oriented Programming
Hi Phillip,
>Just brainstorming here, but do you think that it would be possible to create an array of references to objects and then use the properties and methods of those individual objects by dereferencing through the array references?
>
>For example:
>
>DIMENSION myarray(10)
>myarray(1) = CREATEOBJECT("Object1", "MyClass")
>...
>
>and then myarray(1).Value???
>
Yes It is
DIMENSION MyArray(1)
MyArray(1) = CREATEOBJECT("MyItem")
MyArray(1).value = "a"
? MyArray(1).value
DEFINE CLASS MyItem AS Custom
Value = .NULL.
ENDDEFINE
>But then, how would I create a class that holds all the created objects and be able to reference them such as Parent.MyObjects(1).Value???
>
I am not sure I understand what you want but MyObjects(1).Parent.Value is possible with VFP
Marcel
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only