Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modifing classes
Message
From
28/12/1997 16:31:39
 
 
To
28/12/1997 10:49:04
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00068012
Message ID:
00068156
Views:
40
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
Map
View

Click here to load this message in the networking platform