Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I search string in all classes within my classli
Message
 
 
À
25/03/2000 02:13:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00350248
Message ID:
00350376
Vues:
29
Hi Cetin,

>>I need to find 'thisform.lockscreen' in all my classes code. Is there an easy way to do it?
>>
>>Thanks in advance
>
>
Nadya,
>This could also help :
>
Lparameters tcSearchString, tcExtension
>
>lcDir = getdir("","Where files are located?")
>If empty(lcDir)
>  Return
>Endif
>
>Create cursor flist (scxname c(30), fieldname c(20), recnumber i)
>Select 0
>=adir(aFormfiles,lcDir+"*."+tcExtension)
>For fcnt = 1 to alen(aFormfiles,1)
>  Use (lcDir+aFormfiles[fcnt,1]) alias current
>  Scan
>    For ix = 1 to fcount("current")
>      If type(field(ix,"current"))$"CM" ;
>          and atc(tcSearchString, eval(field(ix,"current")))>0
>        Insert into flist values ;
>          (aFormfiles[fcnt,1], field(ix, "current"), recno("Current"))
>      Endif
>    Endfor
>  Endscan
>  Use
>Endfor
>Select flist
>On key label "F2" do EditTarget
>Go top
>Brow
>On key label "F2"
>
>Function EditTarget
>  Use (lcDir+trim(flist.scxname)) in 0 alias EdtSCX
>  Go flist.recnumber in "EdtSCX"
>  Select EdtSCX
>  Wait window nowait "Field name is : "+(trim(flist.fieldname))
>  Browse
>  Use
>  Select flist
Cetin

Thanks a lot for this code, I'll see, if I can use it. Just one question: is it safe to edit directly scx file or vcx file? Especially vcx? For safety I would archive these classes before edit.

BTW, I usually change scx file directly if I want to repoint one of form's object to another class...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform