Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do find all programs
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00469255
Message ID:
00469400
Vues:
17
>>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
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform