Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Superclass
Message
De
22/05/1997 13:15:01
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00033281
Message ID:
00033291
Vues:
35
>Can I have a class that can modify a textbox class and a spinner class
>at the same time ?
>I want to use a new property or the same method in both classes.
>
>For example:
>
>I want the lostfocus event execute the same thing for both classes, without
>using an external function, and I want to declare a new property that can
>be used in both too.

VFP doesn't directly support multiple parent classes like some other OO languages do (I forget the term for this).

What you can do is have a form method that is called by both objects or some other global object with common methods. Have each LostFocus method call this common method. I know this isn't exactly what you want but it works well.

This would mean that you would also need to add properties to both class trees.

-Doug-
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform