Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot modify a class that is in use
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00290587
Message ID:
00290628
Vues:
21
>I keep getting the above error with a class that I have. 'Clear all' releases whatever is causing the problem, but I need to fix the class.
>
>I have a class called vwbBase. It's a container with a couple labels in it. I subclassed it and created two more classes vwbClient and vwbBillTo.
>
>I put vwbBase on a form and run the form, close the form, try to edit vwbBase and it works fine.
>
>I put vwbClient on a form do, the above, it works fine. I put 2 instances of vwbCleint and it still works fine.
>
>I put vwbBillTo on a form, do the above, it works fine. I put 2 instances of vwbBillTo and it still works fine.
>
>But, If I put 1 vwbClient and 1 vwbBillTo on the same form, run it, close it, and try to edit any of the those classes I get "Cannot modify a class that is in use"??????
>
>I ran DF's ObjRef after running the form, it didn't find anything.
>
>I have checked the classes and everthing is local (with the exception of a couple public properties that only store strings). I don't store any obj references anywhere in the classes. I've recreated vwbBase from scratch. Tested with different forms. Tested with a plain VFP base form. I added a release method to the contain and put release this in it. In the destory event I put this.release. Nothing I've done has solved the problem.
>
>Does anybody have any ideas? I can't figure it out.

This may be pretty basic but look at your SET("CLASSLIB") value after tanking the form. If there is a reference to the class library you won't be able to edit it.
Dan LeClair
www.cyberwombat.com
SET RANT ON - The Wombat Blog

Life isn’t a morality contest and purity makes a poor shield. - J. Peter Mulhern
Disclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform