Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Viewing superclass code
Message
De
07/04/2003 12:00:05
 
 
À
06/04/2003 12:53:04
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00774534
Message ID:
00774750
Vues:
12
Does the button CLASS's click method have code in it... or, does the button INSTANCE's (on the form) click method have code in it.

My guess it is the latter, and you can't see instance code of contained objects in the subclass of the container object cause the code isn't in the button class.

This is known as psuedo-subclassing. Marcus expalains this in his book on VFP OOP.

The is generally the reason you have events call methods. The button class would have something like ThisForm.New() in it's click, and the form class would have a New method. This way, when you subclass the form you can open it's new method, look at the superclass code, and override it if you want. This was you will also so the code in the superclass of the button click since it is actually in the buttons class definition.

BOb


>I have a .scx-based form based on a form class (.vcx-based) with a (subclassed) command button on the original form class. When I am in the .scx form and I click on the 'Show superclass method' button for the button.click() method, no code is displayed, even though the class button.click() method definitely has code in it.
>
>This behaviour is especially weird when I can show superclass code for eg. form.init() or textbox.valid() for the same form. It appears that this problem is confined to command buttons.
>
>Is anyone else aware of this problem?. Is there any way around this - it is a pain to have to open the original class to look at the inerited code.
>
>Any help would be appreciated. I am using VFP7 sp1.
>
>Alan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform