Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reconciling Properties Concept to Fields Concept
Message
De
15/02/2006 08:22:47
 
 
À
15/02/2006 04:14:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01096402
Message ID:
01096444
Vues:
11
>Hi ERic,
>
>A VFP class surely is lacking modern OOP concepts. It's members can be events, methods and properties, not fields. And by the way you can only add user defined methods and properties, not events. And you can't remove something inherited. So if you want to define a class member at runtime, you should not define it in the class, but add it dynamically in init. You can't overload an existing member with another class, even if that is based on the same base class.

You can simulate overload:
procedure OveloadObject(cName,cClass,cClassLib)
* IF VARTYPE(m.this,m.cName,5) and ...
  baseclass::Removeobject(m.cName)
  baseclass::Newobject(m.cName,m.cClass,evl(m.cClassLib,''))
* ENDIF
>
>The other thing is "fields". The normal meaning of "field" in VFP and any database is a column of a table (database table). If you think of a table as holding an object, you may think of the table fields as object properties. Is that what you ment with "field"?
>
>Bye, Olaf.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform