Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Method code disappearing
Message
From
30/07/1998 14:48:59
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
To
29/07/1998 14:10:22
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00122400
Message ID:
00122804
Views:
15
>I have a pgfBase class with code inside several methods (some mine, some native). When I run a form that uses that class, then go back to modify the class the code is missing from the methods (my methods are still there - just blank). All properties still have my settings.
>
>If I exit without saving, and re-start the VFP5.0a session, the code has returned,
>but
>if I save any changes the code is gone for good.
>
>I'm guessing that somehow some sort of memo file is being disconnected from the main file, but only for the one class. All other classes in that vcx file appear to be fine.
>
>
>Any ideas?
>
>TIA


I have had this happen to me a few times. At first it was a bit of a shocker but I more or less understand now what is happening. If there is an outstanding reference to a class and you open up the designer (class or form, etc) then the data from the memo fields isn't loaded and it looks like all your method code is missing. Normally, you can't load a class if it is in use but you might be able to if there is are no references (that is you do something like this:)
ox = CreateObject('myclass')
ox = NULL

Your object is still hanging around in memory but you can't get at it to release it.

What I have found is a CLEAR ALL and RELEASE ALL will bring back the data. Whatever you do, don't save any code in a method that seems empty. It will remove any of the real code.

This behaviour should be reproduceable because when it happens to me, I usually know why (app or form did not close properly or I did a Cancel, etc.)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform