Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating collection classes
Message
From
01/05/2001 12:47:22
Phillip Perkins
Technology Consulting, Inc.
Louisville, Kentucky, United States
 
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00501934
Message ID:
00502055
Views:
21
Aha!!! Just figured it out. For those of you that want a simple solution to my problem (at least the ground work), the way that I solved this was to create a class (custom, container, whatever) and add an array property (class.thing[1]). Then, add objects to your class like crazy (run-time is what I'm going for). When you add these objects, redimension your array property and point that property to your object.

Here's the deal ( I chose to use a form with a textbox collection in this example ):

myform = CREATEOBJECT("Form")
myform.AddProperty("thing[1]", NULL)
myform.AddObject("text1", "textbox")
myform.text1.Value = "Whatever"
? myform.thing[1].value

Should print "Whatever" to active area (SCREEN).

>Use the examples given in my previous post, these are generic collection classes and do exactly what you want. You may have to subscribe to FoxTalk but the VFUG one is free.
"D'OH!" --Homer Simpson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform