[fpc-pascal] Adding method dynamically to a class
jcchu at acm.org
Tue Jun 19 15:39:08 CEST 2012
Depending on what you’re actually trying to do, you may consider
implementing your own invokable variant type. I found a tutorial at
http://alex.ciobanu.org/?p=152. Basically, instances will be wrapped
in a TVarData-compatible record, and your custom
TInvokeableVariantType-derived class will allow you to intercept
On Tue, Jun 19, 2012 at 8:22 PM, ik <idokan at gmail.com> wrote:
> 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 ?
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal