[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class[Symbol] question



On 21/9/24 1:52 am, Benoît Minisini wrote:
Le 20/09/2024 à 18:07, BB a écrit :
Is there a way to tell at runtime whether a class symbol is inherited?

tia

b



By looking in the parent class if you find the same symbol.

What for?

I've got a complex project underway and it has a fairly complex set of classes that inherit from several layers of parents. I am trying to put a grid in the "common" display form showing all the properties of the current class and the values of the current object. I just want to test if a property is inherited or not and if not then that row is formatted bold. A bit like how the Help Browser does it.

Why at runtime? Because I am having a hard time of it finding properties that are not being displayed (or not in the right place) and it would be easier if I could see the local properties highlighted.

It sounds like a lot but the properties gridview is working fine and all the properties of the class are displayed. Its just that highlighting that is avoiding me.

To expand your answer a little bit, I think that I need to load all the parent classes properties up the chain when I start to load the grid and then for each property in "this class" I could just check that list for the property name? Or would it be faster to check the Object.Class(thisclass.Name).Parent each time?

How (in simple terms) does the help browser do it? I've tried wading through the IDE code but just can't find it.

thanks

b


Follow-Ups:
Re: Class[Symbol] questionBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
References:
Class[Symbol] questionBB <adamnt42@xxxxxxxxx>
Re: Class[Symbol] questionBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>