Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Intellisense and other issues with DIMENSION in classes
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Intellisense and other issues with DIMENSION in classes
Miscellaneous
Thread ID:
00592744
Message ID:
00592744
Views:
55
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!
Next
Reply
Map
View

Click here to load this message in the networking platform