Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sub-Classing a PRG-based Class
Message
From
28/05/2002 21:58:16
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
28/05/2002 13:46:17
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00661784
Message ID:
00662265
Views:
33
>Hi Charlie,
>
>There are a number of potential problems that come with using the FROM clause of DEFINE CLASS. We could probably start a wiki topic about this to localize the pros and cons, but off the top of my head here's why I never use the FROM clause of DEFINE CLASS
>
>1) Can't use the invocation stack for sensibly locating class definitions. (I do this a lot).
>
>2) Thereafter moving classes from one PRG to another breaks code. (I do this a lot).

The good side of this would be the documenting nature of the clause. In a vcx, you always have a link to the parent class; in a prg, there's none, unless you use the From clause.

Of course, some discipline would enable both: adding the link in a comment (so we don't have what you complain about), and if it's hard to maintain it once the parent class is moved to another prg, there should be a trail in the comment in the original prg ("class ParentRat moved to OldRats.prg").

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform