Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search within a project
Message
From
25/11/2003 12:31:52
 
 
To
25/11/2003 12:09:07
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00853363
Message ID:
00853378
Views:
17
>I'm wondering if there is a utility that will search an entire project for a string of text. I'm deleting some buttons from a form and I would like to make sure there are no references to them in any of the other forms or programs. In the old spagetti code days (FoxBase, Foxpro DOS) I had a program that searched all my program code for < string >.
>
>Thanks,
>Larry Morelli

What version of VFP are you using? if vfp8, there's the Code References tool.
Prior versions, I've rolled my own: in VFP, you'd search primarily PRGs and the methods column of VCX and SCX tables.
e.g.
LParameters tcProject, tcString

Select name ;
  From (tcProject) ;
  Where type in ('K','V','P') ;
  Into cursor cuObjects
Scan 
  lcName=Chrtran(name, Chr(0))
  If type='P' 
    If Lower(tcString) $ Lower(FileToStr(lcName))
       ** output: String in + < lcName >
    EndIf
  Else
    Select * ;
      From (lcName) ;
      Where Lower(tcString) $ Lower(methods) ;
      Into Cursor cuTmp
    If RecCount()>0
       ** output: String in + < lcName >
    EndIf
  EndIf
EndScan
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform