Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The Programming Mess
Message
 
À
14/05/2013 05:15:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01572688
Message ID:
01573754
Vues:
90
J'aime (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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform