[Gambas-user] Enumerate all classes inheriting X

Benoît Minisini gambas at ...1...
Sun Nov 8 04:16:13 CET 2015


Le 08/11/2015 04:14, Benoît Minisini a écrit :
> Le 07/11/2015 15:20, Benoît Minisini a écrit :
>>
>> At the moment, you can't get any information on a class without loading
>> it into the interpreterer, which may have unwanted effects...
>>
>> I have the same need, so I may provide a solution in the future!
>>
>
> In revision #7457, I have added a Class.Stat() static method through the
> 'gb.util' component.
>
> You give a class name of the project, and CClass.Stat() tells you its
> parent class name and if the class is exported. If the class does not
> exist in the project, you get an error.
>
> Regards,
>

...and of course it gives you that information without loading the class 
into the interpreter.

I need that for the future gb.web.form component, that assumes that the 
first path element of the request URL is the name of a webform. So I 
must check that a real webform is provided, without loading anything.

Regards,

-- 
Benoît Minisini




More information about the User mailing list