Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unused classes
Message
From
06/03/2006 21:14:46
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
06/03/2006 20:56:56
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
01101765
Message ID:
01101908
Views:
22
>>That would be a false negative. A false positive would be a class which is subclassed, but subclasses are never used.
>
>Yeah, I did think about that possibility, but I think that would be no problem. After deleting the unused subclasses, I could run the hypothetical process again, and detect the superclass.
>
>> Also, if you're using a data-driven class factory, you'd need to check for factory calls, to see if there are dead records in the factory table.
>
>I am not sure how that factory thing would work.

Just more work to be done. Usually, a factory object is called with
oNewObj=oFactory.Create("The Pink Form")
It looks into some factory.dbf for a record with "The Pink Form" in the name field, and uses other fields to retrieve actual class and classlibrary of the object to create. So the additional work here would be to look for all lines containing oFactory.Create().

Anyway, to do something like this, one needs a list of the ways the objects are created. In the case of my apps, it would have to include anything mentioned in a certain field of menu.dbf, then anything in certain properties of some classes (i.e. the names of bizobject classes to use), then any .addobject(), .newobject(), .createobject() and thanks, no Add Object (no composites defined in code). Then if any of the calls return variables instead of just strings, look them up in code.

Probably the tables left by CodeReferences may be used for this.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform