<div dir="ltr"><div class="gmail_quote">On Tue, Jun 19, 2012 at 4:13 PM, Mattias Gaertner <span dir="ltr"><<a href="mailto:nc-gaertnma@netcologne.de" target="_blank">nc-gaertnma@netcologne.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div>
<p style="margin:0px"><span><span></span></span></p>
<p style="margin:0px"></p>
<div style="margin:5px 0px">
<div>
<br>ik <<a href="mailto:idokan@gmail.com" target="_blank">idokan@gmail.com</a>> hat am 19. Juni 2012 um 14:22 geschrieben:
<br><div><div>
<br>
<div>
<blockquote style="margin-left:0px;padding-left:10px;border-left:1px solid blue">
<div dir="ltr">
Hello,
<br>
<br>Is there a way to tell in run-time that a specific function/procedure should belong to a class ?
<br>
<br>For example, let's say I have the following class:
<br>
<br>Type
<br> TTest = class
<br> procedure Foo;
<br> end;
<br>
<br>And I have also:
<br>
<br>procedure Bar;
<br>...
<br>end;
<br>
<br>Is there a way to make at some point of my code execution, that Bar will be a method of TTest ?
<br>Or maybe for a specific instance of TTest ?
</div>
</blockquote>
</div>
</div></div></div>
</div>
<p style="margin:0px"> </p>
<p style="margin:0px">Do you mean that TTest.MethodAddress('bar') should return your Bar?</p></div></blockquote><div><br>Yes, after "adding it" (glue) to the TTest class/instance. <br>Like with some dynamic languages that allow you to create/attach methods on run time.<br>
<br></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<p>Yes. </p><span><font color="#888888">
<p> </p>
<p>Mattias</p>
<p> </p>
<p> </p>
</font></span></div><br>_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br></blockquote></div><br></div>