Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Intellisense and other issues with DIMENSION in classes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Intellisense and other issues with DIMENSION in classes
Divers
Thread ID:
00592744
Message ID:
00592744
Vues:
54
I have used the following "trick" to make a friendly class with VFP7. However ASSIGN allows only character ot numeric parameters. Also it seems intellisense executes your code as you are typing a property name. Weird!

* Class test in test.prg
DEFINE CLASS test as session

DIMENSION myprop(1)
var1=''
var2=''

FUNCTION myprop_assign(elem, inx)
this.var1=elem
this.var2=inx
ENDFUNC

ENDDEFINE

* Try this to test program
*
LOCAL xx as test of test.prg
xx=CREATEOBJECT("test")
xx.myProp(1)='abc' && Ok
xx.myProp('abc')='xyz' && Ok
xx.myprop(.f.)=123 && Error
xx.myprop({1/1/2001})=123 && Error

Also at the command prompt while you are typing:

xx.myProp( <-- At this point Intellisense executes the code.

Weird!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform