Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Would THIS property can contain an array?
Message
De
25/05/1998 07:26:41
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00101633
Message ID:
00101636
Vues:
22
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform