Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ridding an app of an old class lib
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00183998
Message ID:
00184069
Vues:
36
>>>>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).
>
>The only way I know to copy is to put both in the project manager and drag and drop.
>
>-Michelle

There seems to be some sort of display bug in vfp6. Drag/drop wasn't working. But I found that if I dragged to just the right area at the top of the PM window, it would start to scroll slowly and let me drop in the other .vcx. So that part is accomplished.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform