[fpc-pascal] Adding method dynamically to a class
nc-gaertnma at netcologne.de
Tue Jun 19 15:13:59 CEST 2012
ik <idokan at gmail.com> hat am 19. Juni 2012 um 14:22 geschrieben:
> Is there a way to tell in run-time that a specific function/procedure should
> belong to a class ?
> For example, let's say I have the following class:
> TTest = class
> procedure Foo;
> And I have also:
> procedure Bar;
> Is there a way to make at some point of my code execution, that Bar will be a
> method of TTest ?
> Or maybe for a specific instance of TTest ?
Do you mean that TTest.MethodAddress('bar') should return your Bar?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal