Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding all instances of a class?
Message
De
27/11/2006 13:44:54
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
27/11/2006 13:37:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01172726
Message ID:
01172729
Vues:
16
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform