Actually it can, technically speaking, although why you'd do this is beyond me:
In dynamictest.cfc:
<cfcomponent>
<cffunction name="init" access="public" returntype="dynamictest">
<cfargument name="someProperty" type="string" required="yes">
<cfset VARIABLES.someProperty=ARGUMENTS.someProperty>
<cfreturn THIS>
</cffunction>
<cffunction name="myFunction" access="public" returntype="string">
<cfargument name="myArgument" type="string" required="yes">
<cfset myResult=ARGUMENTS.myArgument>
<cfreturn myResult & " " & VARIABLES.someProperty>
</cffunction>
</cfcomponent>
In a calling page:
<cfset theObject = CreateObject("component","dynamictest").init("James")>
<cfset theMethodToCall = "myFunction">
<cfset theObject.myMethod = theObject[theMethodToCall]>
<cfset myResult = theObject.myMethod("hello")>
<cfoutput>#myResult#</cfoutput>
On Fri, Jun 20, 2008 at 5:18 AM, Matt Williams <[EMAIL PROTECTED]> wrote:
> Can't be done in a regular cfset
>
> <cfinvoke component="#theObject#" method="#url.methodCall#"
> argumentcollection="#args#" returnvariable="methodResults" />
>
> On Thu, Jun 19, 2008 at 4:14 PM, Brad Haas <[EMAIL PROTECTED]> wrote:
>> I know using evaluate is a no-no, but I'm stumped on how to restate this
>> line of code:
>>
>> <cfset methodResults = evaluate("theObject.#url.methodCall#(#args#)")>
>>
>> Any help would be appreciated.
>>
>>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307815
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4