[fpc-pascal] Invoking methods through rtti

Sven Barth pascaldragon at googlemail.com
Mon May 9 20:51:00 CEST 2016


Am 09.05.2016 18:19 schrieb "Mazo Winst" <mazofeifer at gmail.com>:
>
>
>
> Em segunda-feira, 9 de maio de 2016, Sven Barth <
pascaldragon at googlemail.com> escreveu:
> > Am 09.05.2016 17:23 schrieb "Mazo Winst" <mazofeifer at gmail.com>:
> >>
> >> Is there any way to invoke a method passing parameters through rtti?
> >
> > As long as you know the signature of the method you can cast the
pointer to the method to an approbiate method variable and call that. For
dynamic calls you'll need to wait for Invoke() support which is on the ToDo
list, but there's no ETA yet.
> >
>
> In my use case,the name of the method are determined at runtime.

The name is not the problem. The signature is. As long as you know the
signature at compile time you won't have any trouble currently. Everything
else you'll need to do yourself currently.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160509/443c4011/attachment.html>


More information about the fpc-pascal mailing list