Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using .PRG Classes
Message
From
16/11/2000 13:36:07
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00442305
Message ID:
00442809
Views:
15
>My problem is that is seems reasonable to keep your base class in a seperate .PRG, yet there is no way to do a SET PROCEDURE in the child that will allow this. I tried using a third program with a SET PROCEDURE before creating the child class, but it only set the procedure in the third program, the child class didn't find it.
>
>I would think someone would have run across this before.

This is not common because the standard practice is to SET PROCEDURE TO all the prg files containing classes at the top of the code for the application, then the classes are all available for use.

What are you trying to accomplish?
As long as the parent class prg is available with SET PROCEDURE, you can CREATEOBJECT() on the child. e.g. Try this in the command window

SET PROCEDURE TO parentclass.prg, childclass.prg
oChild = CREATEOBJECT("childclass")

** or
SET PROCEDURE TO parentclass.prg
oChild = NEWOBJECT("childclass","childclass.prg")
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform