Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add an Array Property to a Class
Message
 
To
28/08/2007 16:24:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 5
OS:
Windows Server 2003
Miscellaneous
Thread ID:
01251003
Message ID:
01251007
Views:
18
This message has been marked as the solution to the initial question of the thread.
>I do this very seldom, so I've forgotten how. Could someone please refresh my memory on how to add an array property to a class at design and/or run time? TIA

In code you do something like
loTest = Createobject('myTest')

define class myTest as Session

	protected myProtectedArray(1)
	dimension myPublicArray(1)
	hidden myHiddenArray(1)

enddefine
In run time you can do something like
loForm = Createobject('Form')
loForm.Addproperty('myArray(1)')
loForm.myArray[1] = 'Test'
? loForm.myArray[1]
and in designer you just add it as a regular property with a dimension
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform