MODI FILE NOWAIT
on all files found, then do an aSelObj(aA, 1)
and this will tell youf is SetFOcus() is in the Init method:?'SetFocus()' $ aA[1].ReadMethod('init')
oReg = CREATEOBJ('VBScript.RegExp') >oReg.Global = .t. >oReg.IgnoreCase = .t. >oReg.Pattern = 'PROCEDURE INIT([^\0]*)ENDPROC' >#DEFINE CRLF CHR(13)+CHR(10) >cInitsWithSetFocus = '' >FOR Each cFormSubDirPath IN all app's directory tree > cStartDir = FULLPATH(CURDIR()) > CD (cFormSubDirPath) > DIMENSION aSCXFiles[1,5] > nForms = ADIR(aSCXFiles,'*.SCX') > FOR i = 1 TO nForms > USE (aSCXFiles[i,1]) AS ThisSCX > SCAN FOR 'form' $ lower(BaseClass) AND ! EMPTY(Methods) > oReg.Execute(ThisSCX.Methods) > FOR EACH oMatch IN oReg.Matches > IF 'SETFOCUS' $ UPPER(oMatch.Value) > cInitsWithSetFocus = cInitsWithSetFocus + cFormSubDirPath + ' ' + ; > aSCXFiles[i,1] + ': ' +ThisSCX.ObjName + CRLF + ; > oMatch.Value + CRLF + CRLF > ENDIF > ENDFOR && each match > ENDSCAN && each form rec in SCX > ENDFOR && each SCX > USE IN ThisSCX >ENDFOR && each app dir > CD (cStartDir) >IF LEN(cInitsWithSetFocus) > 0 > =STRTOFILE(cInitsWithSetFocus,'InitsWithSetFocus.TXT') >ENDIF