Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding all instances of a class?
Message
From
27/11/2006 13:44:54
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01172726
Message ID:
01172729
Views:
15
>Hello,
>
>I was wondering if anyone knew of a way to find all classes that had a certain parent class?

The question is where to look for them. Within the current project, or set("path")?

It shouldn't be hard to do, though, you'd have to

select class, classloc from {vcx name here} where parent = lcParentClass

and then check the classloc (probably using sys(2014) to find the absolute path from the relative path stored in the field) to see if it's really the parent class we meant, or another one with the same name but in a different vcx.

That's for visual classes. For prg based classes, that'd be a bit more interesting - one would need to write some code parsing code, and deal with the lack of "of {filename here}" in the Define Class statements. Keep in mind that a visual class CAN be subclassed in a prg (but not the other way round, AFAIK), so the two ways of traversing the pedigree need to complement each other.

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