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

Tidying the symbol table for a form class or a form

Status
Not open for further replies.

AndrewMozley

Programmer
Oct 15, 2005
621
GB
I have a project myproj which exists as two files myproj.pjx and my proj.pjt

This has a form class amform.vcx, which has several controls on it, including a text box mytext. And this textbox class had a custom method ammethod.

I have recently decided that I do not need this method. So I have removed it from the form class amform. I have also removed it from the two instances frm1.scx and frm2.scx of amform where I had included some code to make use of that method.

The application runs fine, and I had believed that the project and all its forms and code were as they were before I introduced this method.

However, I use a tool Searchmyfiles which I have found useful to examine all the files in a folder (or on the complete drive(!) to find those files which have a certain character string.

When I run this and scan my project folder for ammethod, most of the files in that folder and its subfolder are clean. So frm1.scx/sct and amform.vcx/vct do not contain the string ammethod.

But the only file which does contain the string ammethod is the memo file of the project myproj.pjt. And if I USE the project file as a dbf file and key in :

Code:
LOCATE FOR "AMMETHOD" $ UPPER(Symbols)

. . . . it shows me that the records which refer to the forms class anmform, and the two forms instances which I had edited are the ones which have the symbol “AMMETHOD” still present.

Is there a way of tidying this? Do I perhaps need to remove the class definition and the relevant forms from the project, then add them back in.

Or should I let sleeping dogs lie?

Thanks
 
You might try 'Clean up project' from the project menu?

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Thank you for your prompt reply, Griff.

Have tried that and it makes no difference. If anyone knows how to clean up the project to remove this obsolete reference I would be grateful.
 
Andrew, what you are seeing is not surprising. The string in question was clearly contained in the project file's memo field (contained in myproj.pjt). When you deleted the reference, it was deleted from the memo field. But remember, deleting a memo doesn't completely expunge it from the file; it lives on in the form of memo bloat.

It's likely that Griff's suggestion would work. But, if it doesn't, you can always USE the PJX project file exclusively, and then do a PACK (or perhaps a PACK MEMO). In any case, that's a good thing to do from time to time.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thanks Mike. The obsolete symbol is indeed contained in myproj.pjt - as Searchmyfiles discovered. Sadly, packing the file myproj.pjx does not remove the (obsolete) symbol from the symbol table - I should have mentioned that I had tried that.

Not sure that this is a case of memo bloat. If you open the project as a dbf file and browse it, you can see that the obsolete symbol is there, within the Symbols field of the record for the form or class - which includes a list of the methods used in the form (or class).
 
Is that symbols table/list not built when you do a recompile?

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Thank you Griff. That seems to have done the trick.

I opened the project and in the project window, asked to Build the project. And now, when I examine the myproj.pjx/pjt file, the symbol no longer appears.
 
Happy to help

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top