Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing a form control's parent method
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00065004
Message ID:
00065047
Vues:
24
>>I have a container class on my form called commandbutton. The click method has the code: thisform.recAdd()
>>Included in the code for Thisform.recAdd is:
>>
>>Thisform.commandbutton.parent.disableupdate()
>>
>>Disableupdate is a method of class commandbutton. But I get error 1734 - "Property DISABLEUPDATE is not found"
>>
>>How should I be referencing this method?
>
>'Parent' property refer to object container and doesn't fit to your purpose. It can be two cases when you want to invoke code from Object Class (I guess this is the case).
>1. If your object doesn't have own method code, i.e. Commandbutton (in Form Designer) has nothing in Disableupdate snippet, then you just call Thisform.commandbutton.disableupdate ahd get all code inherited from class.
>2. If your added some new code in Form Designer, but still want to call class code, then you use '::' scope resolution operator and fire Thisform.commandbutton::disablebutton


Got it. Thanks.

AL
Al Williams

Anola MB, CANADA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform