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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disappearing code! VFP9sr2

Status
Not open for further replies.

Goofus828

Programmer
Nov 9, 2005
127
US
Has this happened to any of you?

Working on a project - build it and deploy it. Then things do not work. Investigate and find out that the code behind the objects is missing!

I have to open the form as if i were browsing a table. Locate the record of the object that lost the code. Copy the code out of the method memo field and past it back into the form's method.
Very scary when this happens.
I cannot pin it down to why it is happening, but I have now implemented 30 minute backs of my work.
 
... things do not work" is a little vague.

But off the top of my head it sounds like you may be dealing with classes that are inheriting code. This would make the methods appear to be empty.

Jim
 
...things do not work" means, when I click the Run command button - nothing happens, because the code behind the button is gone.

I'm a simple programmer and I do not use classes other than the standard objects.
 
Something similar used to happen occasionally in older versions of VFP. Basically, the object code would disappear or would become corrupted. You had to explicitly compile the form or class to bring it back.

I don't recall seeing it in VFP 9.0, but whatever caused the problem might well still be present.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
if i am thinking correctly that everything in vfp is built on tables ie. froms, libraries, projects... and code is in memo fields so could it just be that the memo file .vct is corrupt. also i think when you open the vcx file you can use myclass.vcx exclusive and run pack memo and maybe "fix" the memo file.

Steve Bowman
Independent Technology, Inc.
CA, USA
 
You might try using the Recompile all option when you build the project. That would ensure you have the latest object code for everything.

Tamar
 
Thank you all for your input.

I threw in the towel and uninstalled VFP and reinstalled it. So far so good.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top