Information générale
Catégorie:
Programmation Orientée Object
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement