Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing deprecated classes and classlibs
Message
 
 
À
07/06/2016 09:14:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01637018
Message ID:
01637055
Vues:
48
>>Thank you. I was thinking the same approach too. However, I have places where some objects are instantiated in code; therefore, at run time I may still get errors. So, thoroughly testing is still required.
>Hi,
>
>Instantiate GoFIsh4 - or even better Thor with GoFIsh4
>now you can search thourghout your whole project for CREATEOBJECT or ADDOBJECT a.s.o to find where your classes are called.
>Than you can populate your Setclasses procedure file with these and consequently: all classes are preploaded.
>Remove ( donot delete ) all your classes from your project and rebuilt. Only those classes now presented in your project file belong to this project, all others can be safely removed = deleted from the project folder.
>One word of precaution: before finaly removing them, rename them first with something like a 3times prefix underscore ( ___ ). Than rebuilt your project and exe. Run it for several times and only after enough testing you remove the classe marked with ____. In case you encounter errors classes cannot be found simply rename them with their old names and, important, add them also to your Setclasses procedure file.
>
>Regards,
>
>Koen

Thank you for your input, Koen. I am still learning all the options of GoFish4. Currently I just use it to search for names. And it helps a lot. I prefer to change and remove manually in VFP IDE (since I don't know GoFish so well, I don't want to damage anything). And I use exactly the strategy you suggested. When I need to remove a class I usually will rename it to CLASS_NAME_2B_DELETED. So the "2B_DELETED" suffix will prevent the class from being used and at some point later I can delete it.

What is "Thor"? (in a few words, please).
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform