Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sub-Classing a PRG-based Class
Message
From
28/05/2002 00:00:15
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
 
To
27/05/2002 20:46:53
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00661784
Message ID:
00661847
Views:
26
Hi Steve,
Perhaps I misunderstand. I'm pretty sure I can't handle the flexibility of not knowing exactly who my parent is. VCXs have the parent class hard-coded. Do you wish they didn't?

BTW, FROM RatFace.PRG fails in an EXE due to a confirmed bug. Jim Saunders (MS) verified this. VFP says it can't find the PRG. FROM RatFace.FXP works in an exe, but fails when just running PRGs if there's no RatFace.FXP, (IOW, it won't generate it automatically as it would if you ran Go.PRG.)
So I use FROM RatFace.FXP, and ensure that the compiled code is available during testing... And I like having the class assured of it's parentage. What am I missing?


>Bill, see http://fox.wikis.com/wc.dll?Wiki~VisualFoxProInvocationStack
>
>Say I have a class definition XX in RatFace.PRG
>
>I would *never* recommend
>
>
>DEFINE CLASS YY AS XX from Ratface.PRG
> * ..
>ENDDEFINE
>
>
>(Just because you can do something doesn't mean you should. When you hard-code the parent class location, you loose all the ability of flexibly use your invocation stack.)
>
>Instead, in your Main.PRG or shortly thereafter in startup
>
>
>SET PROCEDURE TO Foo, Bar, ..., Ratface, ...
>
>
>
>Then anywhere
>
>
>DEFINE CLASS YY AS XX
> *  ..
>ENDDEFINE
>
>
>
Charlie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform