<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META name=GENERATOR content="MSHTML 8.00.6001.18876">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=478293212-04032010><FONT color=#800000
size=2 face=Verdana>Hi Wallace,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=478293212-04032010><FONT color=#800000
size=2 face=Verdana></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=478293212-04032010><FONT color=#800000
size=2 face=Verdana>You could play with RTTI, but as there are only 9 I'd tend
to look at a simple array of function pointers and string function names.
Or use a stringlist (for the names) and store the function pointers in the
associated objects list. At runtime set up the function pointers using the
addr() function.</FONT></SPAN></DIV>
<DIV><FONT color=#800000 size=2 face=Verdana></FONT> </DIV>
<DIV><SPAN class=478293212-04032010></SPAN><FONT face=Verdana><FONT
color=#800000><FONT size=2>Y<SPAN class=478293212-04032010>ou could get all OO
and have a base class with subclasses redefining the draw method or
similar.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT color=#800000><FONT size=2><SPAN
class=478293212-04032010></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Verdana><FONT color=#800000><FONT size=2><SPAN
class=478293212-04032010>Steve</SPAN></FONT></FONT></FONT></DIV>
<DIV><BR></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #800000 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Marshland Engineering
[mailto:marshland@marshland.co.nz] <BR><B>Sent:</B> Thursday, 4 March 2010
11:50 p.m.<BR><B>To:</B> delphi@delphi.org.nz<BR><B>Subject:</B> [DUG] Run
Function called from a database field's data.<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>I have 9 function routines that are used by several forms.<BR><BR>I have
a database with 9 records that has specific data for each function. <BR><BR>If
I select record 4 for example, how do I run a function where it's name is
within the database field called FUNC.
<BR><BR>tbl.Oper.feildbyname['Func'].AsString has 'Circle' or 'Square' as its
data <BR><BR>Now I need to run a function like Circle(Data) or Square(Data)
when selecting the relevant record. </DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>Thanks Wallace</FONT></DIV>
<P><FONT size=2 face=Arial>No virus found in this incoming message.<BR>Checked
by AVG - www.avg.com<BR>Version: 9.0.730 / Virus Database: 271.1.1/2721 -
Release Date: 03/04/10 08:34:00<BR></FONT></P>
<P><FONT size=2 face=Arial></FONT></P></BLOCKQUOTE></BODY></HTML>