Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using this.value within a control
Message
De
14/03/2000 15:34:23
 
 
À
14/03/2000 14:57:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00345497
Message ID:
00345515
Vues:
13
>Would you guys agree that it generally is a bad programming practice to use this.value within a control because it makes the code considerably harder to maintain. Using the actual variable or field to which the control is bound is much better.

To expand on Bruce's comments, you will need THIS.Value in control classes that you are designing for reuse throughout an application. You lose the power of inheritance if your code cannot generically refer to the control's value.

It's all in how you think about it. The more OOP you think, the easier your code using THIS.Value would be to maintain.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform