Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting a PRG to a Custom Class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00380640
Message ID:
00380677
Views:
17
>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--
Previous
Reply
Map
View

Click here to load this message in the networking platform