Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The Programming Mess
Message
 
To
14/05/2013 05:15:46
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01572688
Message ID:
01573754
Views:
91
Likes (1)
Hi Thierry,

>IMO a prototype-based object model gives you the ability to change the 'base class' on which every instance is based - VFP does not allow that, you need to manually create sub-classes and derive all your classes and objects from them.

The thing with VFP is that its implementation is closer to the prototype side then the class side, the language however is disguised as a class based language. One of the many oddities that makes VFP hard to master for a new developer.

If you store an expression in a property that uses THIS, that reference points to the class object, eg. =MyFunc(This). If you store this reference and later change its properties, you are indeed changing the class. Subsequent calls to CREATEOBJECT() will reduce different instances. I agree that the language isn't supposed to show this behavior.
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform