Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Would THIS property can contain an array?
Message
From
25/05/1998 07:26:41
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00101633
Message ID:
00101636
Views:
23
>I am trying to store an array to "this" property but I can't successful. Does "this" can do it?
>
>Sunny

I think you want to have an property of the THIS object that is an array.
If you are using the class designer, add a property using the class menu, but when you type the name for your new property, add (1) to the end
e.g.
ArrayDemo(1)

If you are using code directly to define your class, here is an example.

PROCEDURE test
LOCAL loDemo

loDemo = CREATEOBJECT( "MyCustomObj")

DIMENSION loDemo.ArrayProp( 2)
loDemo.ArrayProp(1) = "Hello"
loDemo.ArrayProp(2) = "Goodbye"
? laDemo.ArrayProp(1)
? laDemo.ArrayProp(2)

DEFINE CLASS MyCustomObj AS Custom
DIMENSION ArrayProp(1)
ENDDEFINE
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Reply
Map
View

Click here to load this message in the networking platform