Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sub-Classing a PRG-based Class
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00661784
Message ID:
00661868
Vues:
23
>
>What's the best way to sub-class a PRG based class?
>



assuming You have
PARENT.PRG

DEFINE class MyClass as Session

  bla

ENDDEFINE

DEFINE class AnotherClassOfMe as Session

  trallala

ENDDEFINE

EOF PARENT.PRG
I would do
if atc("PARENT", set("PROCEDURE")) = 0
    set procedure to PARENT.PRG additive
endif

DEFINE class MyChild as MyClass
   nNewProp = 0
   cAnother = "Hi Bill"

ENDDEFINE
or
DEFINE class MyChild as MyClass of <PATH>PARENT.PRG
   nNewProp = 0
   cAnother = "Hi Bill"
ENDDEFINE
I'm always using .PRG extensions and never had any problems so far.

I'm not even sure that, if You call the .fxp (i.e. the compiled version)
the prg gets recompiled at all from the project-manager - maybe an interesting
point I never thought about up to now.

HTH
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform