* Example: Do SearchForClass with 'wizards' * (locate every reference to class within wizards directory) PROCEDURE SearchForClass LParam pcClass If Type('pcClass')!= 'C' .or. Empty(pcClass) ? 'Missing parameter: string to search for in Classes and Forms.' Return Endif Local laFilelist(1), lcFilename, j, lcfmask, lcFilename *- Get a list of all forms in current directory lcfmask = '*.scx' Do While .t. =Adir(laFilelist, lcfmask) Select 0 If Type("laFilelist(1)") == "C" For j=1 To Alen(laFilelist,1) lcFilename = laFilelist(j,1) Use (lcFileName) Alias FAlias Exclusive *- Search within the class filename Locate All For !Empty(FAlias.Classloc) .And. Atc(pcClass, FAlias.ClassLoc)>0 Do While !Eof() ? 'File: ' + lcFilename+', ', ; 'ObjectName:' + FAlias.ObjName+', ', ; 'ObjectClass:' + FAlias.Class Continue EndDo EndFor Endif Use If lcfmask = '*.scx' Release laFilelist Dimension laFilelist(1) *- Get a list of all class in current directory lcfmask = '*.vcx' Else Exit Endif EndDo EndProc