Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ridding an app of an old class lib
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00183998
Message ID:
00184012
Views:
27
>>I know that something similar was asked before. I am moving an app from vfp3 to vfp6. I use my own class library, but I also have some objects based on WIZSTYLE classes. I took the vfp3 WIZSTYLE out of the project and included the vfp6 WIZSTYLE which is in a different folder. Now I'm getting a really weird bug in code in an object which is based on the old class, and whose ClassLibrary property has the path to (one copy of) the old WIZSTYLE. This particular object is a member of one of my own classes. When I USE myclass.vcx I can see the object. The "classloc" field says "wizstyle" but doesn't have the path.
>>
>>I'm thinking that now is the time to rid my app of WIZSTYLE once and for all. So I need to do two things:
>>
>>1) I have objects scattered throughout my app (mostly older ones in forms created using the form wizard by my predecessor) and some in my own classes, whose class is something from WIZSTYLE. I need to change their class to one of my own. I figure that this will have something to do with opening forms and classes as tables and INSERTing my own classes. I wonder about the details. What do I have to watch out for? How do I make sure I got everything?
>>
>>2) I will need to make some new classes in my own .vcx which are copies of WIZSTYLE classes but are not based on them. I can't remember how to copy a class from one .vcx to another. I thought it was easy in vfp3, but vfp6 isn't letting me do it.
>>
>>Thanks, everybody.
>
>If you have a direct conversion, ie oldtextbox = newtextbox, just right a program that opens each form and class as a table. Then replace the classes.
>
>ADIR(laForms,*.scx)
>FOR i = 1 TO ALEN(laForms)
>USE (laTables[i]) IN 0
>REPLACE ALL class WITH newtextbox FOR class = oldtextbox
>REPLACE ALL classloc WITH newloc FOR classloc = oldloc
>USE IN (laTables[i])
>ENDFOR
>
>Check first to make sure I have those fields right - I wrote that from memory, and my memory isn't the greatest. :)
>
>I did this to replace all the VFP baseclasses in my forms with subclasses after I learned that you shouldn't use the base classes. Worked great.
>
>-Michelle

That looks like it handles part 1). Now I need to figure out part 2).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform