<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<BLOCKQUOTE class=gmail_quote dir=ltr
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><U></U><FONT
face=Arial color=#0000ff size=2></FONT>
<DIV text="#000000" bgcolor="#ffffff"><BR>They can, but there is a protocol
that I'm trying to create that provides me information what to execute (out
of white list). The thing is, that the first request maps the methods to be
used, and there could be 2 or 200. To implement 200 methods that might be
used is not a good idea imho, but adding the proper method to the
instance/class will work much better. <BR><BR>It's easy to do in dynamic
language, and I might need to implement it there instead :(<BR> <SPAN
class=359032107-20062012><FONT face=Arial color=#0000ff
size=2> </FONT></SPAN></DIV></BLOCKQUOTE></BLOCKQUOTE>
<DIV class=gmail_quote dir=ltr text="#000000" bgcolor="#ffffff"><SPAN
class=359032107-20062012><FONT face=Arial color=#0000ff size=2>Can't you
create a stub that executes your variable methods/functions? Something
like</FONT></SPAN></DIV>
<DIV class=gmail_quote dir=ltr text="#000000" bgcolor="#ffffff"><SPAN
class=359032107-20062012><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV class=gmail_quote dir=ltr text="#000000" bgcolor="#ffffff"><SPAN
class=359032107-20062012>Type<BR> TTest = class<BR>
procedure Foo;</SPAN></DIV>
<DIV class=gmail_quote dir=ltr text="#000000" bgcolor="#ffffff"><SPAN
class=359032107-20062012> procedure
NewMethod(MethodName:string; MethodAddress:TProcedureOfObject);</SPAN></DIV>
<DIV class=gmail_quote dir=ltr text="#000000" bgcolor="#ffffff"><SPAN
class=359032107-20062012> procedure
Call(MethodName:string)<BR> end;<BR> </SPAN></DIV>
<DIV class=gmail_quote dir=ltr text="#000000" bgcolor="#ffffff"><SPAN
class=359032107-20062012><FONT face=Arial color=#0000ff size=2>NewMethod stores
the name + method address in fe. a StringList. Call just looks up the
method and executes it. The method will receive the Self of the TTest instance
which is what you want.</FONT></SPAN></DIV>
<DIV class=gmail_quote dir=ltr text="#000000" bgcolor="#ffffff"><SPAN
class=359032107-20062012><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV class=gmail_quote dir=ltr text="#000000" bgcolor="#ffffff"><SPAN
class=359032107-20062012><FONT face=Arial color=#0000ff
size=2>Ludo</FONT> </SPAN></DIV>
<DIV class=gmail_quote dir=ltr text="#000000" bgcolor="#ffffff"><SPAN
class=359032107-20062012><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV class=gmail_quote dir=ltr text="#000000" bgcolor="#ffffff"><SPAN
class=359032107-20062012><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV></BODY></HTML>