Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot modify class in use?? it's not! 1

Status
Not open for further replies.

thatguy

Programmer
Joined
Aug 1, 2001
Messages
283
Location
US
Hey all ..

This is a rather odd thing.. I have a navbutton class made up of VCR type buttons that call record pointer moving functions in my business class. Whenever I run my app, they work fine, no problems. But then I close the app and try to edit them and I get the "Cannot modify a class in use" message. First of all, it's not in use and even weirder -- I go into the Class Browser, right click the navbutton class and select Modify and it comes up into the Edit window.. ?!?

Does anyone have any explanation about this? Related problems? This is in VFP6.0, SP5 btw.

Thanks!
-- michael~
 
Your app probably is not unloading all of the class libraries it uses. It is generally a good idea to run the appropriate clear all and close all statements on exiting your app.

In use does not mean actual being used at this minute just that the class is still sitting in memory and or has a reference to it.

The object browser will force a class out of memory so it can be modifed (if it can). They added this feature in VFP 7 to modifiying a class from the command line also.
 
AH!! Thank you So much! That explains things very well.. I save all env vars and SETs before the program runs, then reset them back on the program close, so if I exited out of a program run abnormally, the classlib would never get cleared out. *sigh* I love those easy fixes..

Thanks again!
-- michael~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top