Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cross contamination with Class Libraries
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01128098
Message ID:
01128122
Vues:
22
Steve,

This isn't possible actually at design time when the object is dropped onto the form. You dan't really want code in the class to pay a penalty everytime a form is launched.

I'd use a project hook utility that could a) scan the project looking for "foreign" files and then b) iterate over each form looking for foreign the files. If you didn't make the code change the references, but instead send this bad programmer an email telling him to fix his stuff he'd eventually get tired of fixing and would do it right from the start. *g*

This might be avoided too if you used just the project to drag/drop classes onto a form rather than the toolbar.

>A frequently reoccurring problem in my company has me looking for a better way.
>
>What is happening is that very often one of my programmers will forget to click on the VFP Class Library (i.e. View Classes) icon to add the correct Class Library to the VFP component toolbar. He/she will then proceed to add components to a form from a foreign project.
>
>Since we have several VFP projects going on at any given time, we often find ourselves in the situation where components get added to a form that were subclassed in another project. This requires going into the Meta data for the form and manually changing the ClassLoc and Class fields in the Meta data table.
>
>I was looking for a way to be able to possibly detect this at design time, maybe by putting some code into the Form subclass that could possibly programatically evaluate the Meta data when a new component is added to the form and disallow the addition of the component if it is not from the correct Class Library. But I couldn't see any way of accomplishing this ....
>
>Anyone have a solution to this problem?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform