Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sub-Classing a PRG-based Class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00661784
Message ID:
00661868
Views:
24
>
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform