Title: Calling a method dynamically
got it cheers...
-----Original Message-----
From: Elliot Russo [mailto:[EMAIL PROTECTED]
Sent: Monday, 12 July 2004 1:59 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Calling a method dynamically

Hi,
 
 
<cfset cfcTest = createObject("component", "test")>
 
<cfset myMethod = cfcTest["test"]> <!--- makes a named reference --->
<cfset myMethod ()>
 
 
Elliot
 
PS doesn't like cfcTest["test"]() >
"Taco Fleur" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...

How do I get this to work?
Problem is described in the comments.

<cfscript>
// create the object
obj = createObject("component", "indexServer");

// get the meta data of the CFC
objMetaData = getMetaData(obj);

// if we need to display an input form
if ( isDefined("url.display") )
{
        // get the function
        thisFunction = objMetaData.functions[ url.display ];
}

// if we need to execute the method
if ( isDefined("form.btnExecute") )
{
        // assign the result * * * * * * * this is where I get an error, the error says "Invalid CFM construct" and points to this line * * * * * * *

        result = obj[ thisFunction.name ]( argumentCollection = form );
}
</cfscript>

Register now for the 3rd National Conference on Tourism Futures, being held in Townsville, North Queensland 4-7 August - www.tq.com.au/tfconf
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
Register now for the 3rd National Conference on Tourism Futures, being held in Townsville, North Queensland 4-7 August - www.tq.com.au/tfconf

Reply via email to