Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing the parentclass
Message
From
22/11/2000 15:53:54
 
 
To
22/11/2000 15:48:52
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00444743
Message ID:
00444746
Views:
16
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform