Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting a PRG to a Custom Class
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00380640
Message ID:
00380677
Vues:
18
>That looks good, but it assumes that the PRG contains a Class definition.
>My PRG does not. It is a single procedure that calls several procedures also within the PRG file. I want to convert all these called procedures to Methods in a Custom Class


Rusell,
1. Create your class in a new library
<B>Create Class myclass of mylib as custom</B>
2. Change all procedures in your PRG to following format
<B>
PROCEDURE test1
 LPARAMETERS tcTest1
ENDPROC
PROCEDURE test2
 LPARAMETERS tcTest2
ENDPROC</B>
3. Open class library as table
<B> use mylib.vcx</B>
4. Find record with Platform = "WINDOWS" and objname = "myclass"
5. Copy your PRG into Methods memo field
6. Close table
7. Open table in Class designer
Don't use existing class library because it could get corrupted if you do somthing incorrectly.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform