Simon,
 
I'm using this method for calling functions dynamically. It works well. Not sure if you're recommending it or not!  
 
<cfscript>
    if( isDefined("this." & methodname)){
         return evaluate("this." & methodname & "()");
    }
</cfscript>
 
Keith

+44 (0)1383 412522

L�ghar, committed to excellence.
_________________________

The information in this Internet eMail is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is unauthorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of L�ghar Limited or any of its affiliates. If you are not the intended recipient please contact L�ghar Ltd, Inverkeithing, +44 (0)1383 412 522.

-----Original Message-----
From: Simon Horwith [mailto:[EMAIL PROTECTED]
Sent: 15 March 2005 21:01
To: [email protected]
Subject: Re: [CFCDev] Calling a cfc method whose name is in a variable

Sean,
   You forgot Ray Camden's all time favorite method: #evaluate("my_obj." & method & "()")#

Sorry, Ray... I just couldn't resist!

~Simon
Simon Horwith
CIO, AboutWeb - http://www.aboutweb.com
Editor-in-Chief, ColdFusion Developers Journal
Member of Team Macromedia
Macromedia Certified Master Instructor
Blog - http://www.horwith.com


at www.mail-archive.com/[email protected]

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to