Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Superclass
Message
De
24/03/1999 18:37:39
 
 
À
23/03/1999 09:46:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Divers
Thread ID:
00200723
Message ID:
00201678
Vues:
14
Bob:

Actually, my problem was more complicated than that. Here's a copy of my correspondence with Fletcher Johnson on the subject:

Yossi,

You are dealing with one of those tricky situations. The key here is that
supercls doesn't know where to look. This is a common side effect when
controls in a container are subsequently inherited. Now we have the
container parent class as well as the controls parent class to contend with.
This leads to some problems. There are also some problems with inheritance
in this situation as well.

Keep in mind that you are in essence, violating the rule I gave you. You
are inheriting a container, then writing code to the contents of that
container. The fact that the container is a form is a detail<g>. You may
remember that at one point, I said that I never make my buttons part of the
data form. This is one of the reasons. It was just too complex to try to
explain in class at the time and I didn't have time to cover it on day five.

Essentially the problem is that the button on the form expects to inherit
code from a parent button, not a button on a parent form.

So now you know why it doesn't work as you hoped.

Fletcher


-----Original Message-----
From: Yossi Gourarie
To: Fletcher Johnson
Date: Wednesday, March 24, 1999 6:30 AM
Subject: RE: Superclass


Fletcher:

I tried it with a simple class method, and it works.

BUT, I'm getting the problem when I subclass a form (called frmBase) off the
base VFP form class. Then I subclass a form off frmBase called frmMaint.
This subclass has a number of methods related to navigating, like
frmmaint.next. Then I subclassed my user form off frmMaint. When I go into
the myform.next method, it is blank (that's OK), but nothing happens when I
click on superclass (that's not OK). BTW, both frmBase and frmMaint are in
the same class library, in a different folder, but what difference should
that make?

Thanks for your help.

Yossi

> -----Original Message-----
> From: Fletcher Johnson [mailto:fjohnson@abbasolve.com]
> Sent: Tuesday, March 23, 1999 6:09 PM
> To: Yossi Gourarie
> Subject: Re: Superclass
>
>
> Yossi,
>
> Supercls will only appear when you have an objects method window open. Do
> this. Run supercls. Then modify a class. Now choose a method from the
> methods tab. When the window appears to allow you to enter some code for
> that method, the supercls toolbar should appear.
>
> Good to hear from you. Thanks again for that wonderful lunch!
>
> Fletcher
>
>
> -----Original Message-----
> From: Yossi Gourarie
> To: Fletcher Johnson
> Date: Tuesday, March 23, 1999 12:01 PM
> Subject: Superclass
>
>
> Fletcher:
>
> I'm back in the office ready o try out my new VFP knowledge.
>
> I tried Superclass, but when I click on the button while in a method,
> nothing happens?!
>
> BTW, thanks for a great course.
>
> Yossi
>
>
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform