Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I search string in all classes within my classli
Message
 
 
To
25/03/2000 02:13:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00350248
Message ID:
00350376
Views:
28
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform