Bill,
Issue a CLEAR CLASS myclass_about_to_be_modified
The point is that VFP keeps classes in memory to speed up operation, you know which one you are about to modify, CLEAR It.
Or CLEAR ALL but have a look at the CLEAR Command in Help to see what you are clearing.
HTH
>Unfortunately, since I've closed the form, how do I determine which class is being held in memory.
>After closing the form, I try to modify a class, but I can't because VFP5.0a thinks it's still in memory
>(it's not, but VFP doesn't recognize that). In order to get VFP to recognize that there are no classes
>in memory, I just modify a sub-class of the one I want (any sub-class will do, even one that is not used
>in the form), close that class, then the original class is available to modify.
>
>
>
>>Have a look in HELP.
>>You will find under CLEAR Commands a reference to CLEAR CLASS Classname
>>Because the Class is held in memory you can not modify it until it is CLEARed
>>
>>>>>Frequently after running a form, when I go to the pj to modify one
>>>>>of the classes used in the form (or the form class itself) I get the
>>>>>error "cannot modify class in use" (syntax may be wrong). I spent
>>>>>many hours trying to figure out where it was in use, but then
>>>>>discovered that I can modify a sub-class of the forbidden class, then
>>>>>then forbidden class can be modified.
>>>>>
>>>>>Example:
>>>>>
>>>>>run client.spx
>>>>>modify class frmBase --- error
>>>>>modify class frmData --- subclass of frmBase used by client.spx
>>>>>close frmData
>>>>>modify class frmBase --- works fine now
>>>>>
>>>>>What am I missing?
>>>>>
>>>>>TIA
>>>>
>>>>Sounds like you have an object based on the class still residing in memory.
>>>>When I get this error, I issue a 'clear all' in the command window.
>>>>I have found this clears remaining object and allows me to modify my class.
>>>>
>>>>- Chris Holtz
>>>
>>>Bill and Chris:
>>>
>>>Sometimes even a Clear All doesn't seem to work. In that case, I just close VFP and re-open it. Faster than trying to find what was left open.
>>>
>>>Barbara
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only