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

Re: Dynamic Classe access


Le jeu. 4 sept. 2025 à 12:08, Fabien Bodard <gambas.fr@xxxxxxxxx> a écrit :

>
> Can we access a Class Public Static Variable Dynamically ?
>
> Ex :
>
> In FMyForm > Static Public Value as string
>
>
> In my calling Function
> dim sMyForm as string = "FMyForm"
>
> Dim f as form
>
The answer is in the query ... If I declare f as Form .... Value not exist
in this class desc ...

Dim f as Object goes far better 🙄




> Class.Load(sMyForm)
> f = Class[sMyForm].CreateInstance()
>
> f.Value = "MyValue"     '.... < here I have an error even if I try to
> change Value to a non static property
>
> f.ShowModal
>
>
>
>
> --
> Fabien Bodard
>


-- 
Fabien Bodard

References:
Dynamic Classe accessFabien Bodard <gambas.fr@xxxxxxxxx>