Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Classes
Message
From
16/03/1999 20:40:33
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
To
16/03/1999 20:05:57
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00198394
Message ID:
00198399
Views:
18
>The answer to this question is probably a resounding "NO", but I have to ask anyway.
>
>I've just completed coding all the methods for an object that I had dragged onto my form from a class library and, upon testing it when it didn't work, I realized that I had used the parent class to the object class that I really intended to use. Is there an easy way to fix this? I know that I could drag the correct class onto the form, cut and paste all the properties and method code into the new object and then delete the old one, but I didn't want to have to go thru all this trouble if it's not necessary.
>
>Any quick answers???
>
>TIA,
> Bonnie

FIRST of all any .vcx file is a specially formatted table file and the memo fields hold the code of the methods and the names of the properties.
before doing any surgery on a .vcx file make sure you save a back up of the .vcx file and the corresponding .vct memo file.

What you could do is append the records in the .vcx to the object that you want but you will have to go into the .vcx via USE and muck around with the fields

class , classloc , baseclass , parent , properties , protected , methods

if the object you want these (properties and methods) pasted onto is in the same .vcx class library then you should experiment with changing around these fields to get the desired effect ..
but again make sure you have a saved copy ...

i have managed to do this on two occasions when i made errors like the one you mentioned ... i had no idea whether or not my tinkering would work ...
but it did .... and it saved me some time ....

if it does not work ... or you make a bad assumption ... go back to the saved .VCX and .VCT files .
sorry but this aint exactly a quick and easy solution

Good Luck , Dave.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform