>>Hello all!
>>
>>How may I find a list of all programs that use a particular class? How may I check against a class that are being used by what programs?
>>
>>TIA...
>
>Dodi,
>
>If you mean prg files then you can use the Windows Find utility to locate each instance of SET CLASSLIB TO...then drag the results into the command window to open them. Finding individual references to a particular object in a class can be more difficult. For example, if you use oObject = CREATEOBJECT('MyObj') in one case, then finding MyObj = CREATEOBJ("MyObj") is harded because you've used single quotes in one instance, double in another and abbreviated in the second case.
The VBScript.RegExp object could be set up to process this as a regular expression to get around the abbreviation, quote-use type, and case sensitivity. The real problem comes when you realize that there may be multiple subclasses of MyObj derived from MyObj; if "YourObj", "HisObj" and "TheirObj" are all based on MyObj, the you need to look for all these, and then these can have subclasses...it gets complex. Not to mention that it can be indirected - IOW, you load a memvar with the name of the class to instance, like:
cMyClassNameToInstance = 'MyObj'
cMyClassLib = "EdSillyClassLib.VCX'
oMyObj = NEWOBJECT(cMyClassNameToInstance,cMyClassLib)
To do this right, you really need a tool that can roundtrip a VFP app into a Model, along the lines of Ratrional Rose (perhaps Visual Modeler can do this, I don't know). There's some discussion of these topics in Markus Egger's book on Advanced OOP from Hentzenwerke