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

VFP8 - Code reference

Status
Not open for further replies.

ramani

Programmer
Mar 15, 2001
4,336
AE
I noticed, as often it happens even with experts, that many developers upgrade VFP, then just jump start their existing project as it is with the newer version. Then slowly, over a period of time, the newer commands gets added or used. This is quite natural.

But some of the important tools get ignored for long time until, some one points to them.. Hey.. this is nice, why arent you using it?. That turns them as to stumbling on a new vault and start fancying them.

VFP8 is just in the tradition and several new things are there.

Intellisense, which I put in these tips column once. Mike Lewis also pointed to some great tips on this topic.

I just felt, I should highlight one more.

The Code reference available via the
VFP Menu -> Tools -> Code refernces.
That is a great tool to search the entire project for the occurance of a word or manipulate. You will realise how good it is when you start using it.


I feel as if, how I worked without such a tool in earlier versions. Some of the procedures which I used to achieve paled out in front. For example, I made available the routine to extract all the forms events code and procedures codes, PRGs code etc of a project for documentation. I have provided these to this community in FAQ section. I used to rely on them heavily for searching project wide. Now after VFP8, I use them only for some documentation.

I just felt now telling this here, because I notice some of the known people dont use these facilities, but worked in their traditional way.

Cheers. :)

____________________________________________
ramani - (Subramanian.G) :)
When you ask VFP questions, please add VFP version.
 
Ramani,

Thanks for that very useful post.

You asked how I worked without such a tool in earlier versions. Well, if you were like me, you would have used Steve Dingle's excellent project search tool (from
However, the VFP 8.0 code references tool goes one important step further: It locates references, not just in code, but also in properties, field names, file names, etc.

Mike


Mike Lewis
Edinburgh, Scotland
 
Ramani:

You are right on the money with how we operate.
That Reference tools is very useful.
Never saw it until now.
Thank you very much for the info.


Don


 
Great tool indeed !!

What are the selection boxes for?
 
can you take it a step further and automate the lookup and output to excel file? I am looking to direct it to a directory which is full of subdirectories (which are app names) and find the tables it uses (from the code) and export that to an excel spreadsheet or html and move along to the next folder in the directory

do you think this is possible?
 
Kenddot,

All the search results from code references are stored in ordinary DBF files. So there is nothing stopping you from opening these and copying them to an Excel file. It would only take a couple of lines of code.

As for HTML, one way to do that is to use the VFP Web Publishing Wizard; this can generate a "script" (actually a small PRG) to convert any table to HTML. I've also got some code of my own which does that (see although I have to admit it's a bit primitive.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Excellent post. I think one of the biggest issues is that people don't go through the "What's New" section of the help file. Not only will you find information on these new tools, but behavior changes that can save you lots of time.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
I was looking for a fact about the code references tool and found this thread. I decided to append my question here as this is such an excellent thread that everyone should read. I have, like others here, found this an extremely valuable tool.

Anyway, 2 questions -
1. Does Code References store it's data in:
C:\Documents and Settings\SCoombs\Application Data\Microsoft\Visual FoxPro 8\reffile.dbf
and
C:\Documents and Settings\SCoombs\Application Data\Microsoft\Visual FoxPro 8\refdef.dbf

2. Is it possible to put those dbf, cdx & fpt files in another location? I couldn't see anything in Tools\Options.

Thanks,

Stewart
 

Stewart,

Do you mean the files where it stores its result?

If so, I believe it stores them in a set of files called XXX_REF.*, where XXX is the project name. This is stored in the current default directory.

I don't have anything like REFDEF.* on my computer.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
As Mike said, Code References creates a table for each project. However, if you use folder-based searching, the info for those searches is stored in HOME(7)+"global_ref.dbf"

I think the files you mention store information about the files searching to speed up the next search.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top