Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using .PRG Classes
Message
De
16/11/2000 13:36:07
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00442305
Message ID:
00442809
Vues:
9
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform