Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Method code disappearing
Message
De
30/07/1998 14:56:05
 
 
À
30/07/1998 14:48:59
Bob Lucas
The WordWare Agency
Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00122400
Message ID:
00122814
Vues:
14
>>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.)

I'm trying to understand this as much as possible.
I have a form that uses a frmPages class. The frmPages class uses pgfBase class. If I run the form and just exit out of it, then pgfBase has all it's method code "invisible", but frmPages is just fine, and all other classes appear just fine also. It seems that all classes that were instantiated with the form would be messed up, but only the 1 is. That would seem to indicate that there is some pgf object still hanging around in memory, but not a frm object.
Any other observations that might help explain this?
Bill Morris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform