Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shall we always subclass base controls
Message
De
27/04/2000 09:58:23
 
 
À
26/04/2000 20:31:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00363904
Message ID:
00364085
Vues:
27
Michael,
Heres a perfect example of why you want to subclass ...
A couple of years into development of an app with lots of subclassed controls on many form classes, you realize that you do NOT want CTRL+0 to clear the contents of a control. A little code in all of the sub classed controls and everything is fixed. If you did not sub class the base controls, then you've got a real mess on your hands adding code everywhere. Actually at this point (or sometime sooner) you would have realized the problem and switched to using sub classed controls.


>Probably naive question and has been answered already. What benefits of subclassing base controls if I am not intending to extend their functionality or build an extensive framework. For instance I just want to use a form template ( pageframe with several pages and with a grid on one page and listbox on other). What benefits of using subclassed grid and listbox instead of base ones.
>
>What are the usual practices with VFP ?
>
>Thanks.
>Michael
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform