Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing the parentclass
Message
De
22/11/2000 15:53:54
 
 
À
22/11/2000 15:48:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00444743
Message ID:
00444746
Vues:
12
>Hi, everybody!
>I have a form wich is based on 2
>classes, when i'm pressing the button
>i want the code in the methode("SETMODE") of the parentclass
>to be executed . hOW DO I DO THAT!!!
>Thank U in advence.

Since VFP doesn't have multiple inheritance, I'm assuming you mean by "based on 2 classes" that this class is subclassed from a subclass. i.e.,
Superclass
  \_ SubClass
      \_ ThisClass
In that case, in the Click() event of the button, put

thisform.SetMode()

Since the code is inherited, the parent class code will run.
If you have code in this particular class's SetMode(), you will need to add a DODEFAULT() to this class's SetMode() code. If the SetMode() method takes parameters, remember to include them in the DODEFAULT() e.g. DODEFAULT(parm1, parm2)
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform