Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sub-Classing a PRG-based Class
Message
De
27/05/2002 17:29:33
 
 
À
27/05/2002 17:17:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00661784
Message ID:
00661792
Vues:
32
Evidently I wasn't clear.
I want to :
1. create a session class ( mySession.prg )
2. create 50+ sub-classes ( mySubSession1.prg ) that inherit ALL the PEMs of the parent class.

I don't want to have to edit 50+ prgs when I want to change the parent class code.
How do I get the sub-classes to inherit the parent class PEMs from a different prg?

I just discovered that I CAN'T "#INCLUDE < parent.prg >" in a sub-class.prg because only #DEFINE statements are recognized in a #INCLUDEd file.


>>What's the best way to sub-class a PRG based class?
>
>Hi, Bill.
>
>try something like this:
>
>
>**- Parent.prg
>define class MyParentClass as Session
>enddefine
>
>
>and then:
>
>
>**- Son.prg
>define class MySonClass as MyParentClass of Parent.prg
>enddefine
>
>
>HTH
Bill Morris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform