Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Search within a project
Message
De
25/11/2003 12:31:52
 
 
À
25/11/2003 12:09:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00853363
Message ID:
00853378
Vues:
19
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform