Have you tried using cfinvoke? On 9/7/07, Andrew Grosset <[EMAIL PROTECTED]> wrote: > I have a cfc in the application scope and I access it like so: > > <cfset application.aImage.updateIm(argumentCollection=q)> > > I would like to be able to pass in the cfc name (in this case "myImage") and > the method/function ("adateIm") dynamically. > > If I try this, I get an error: " A CFML variable name cannot end with a "." > character" > <cfset a = "aImage"> > <cfset b = "updateIm"> > <cfset application.#a#.#b#(argumentCollection=q)> > > I also tried this but then it fails again as updateIm calls another function > within "aImage.cfc" and it can't see/access it: > > <cfset z = application[a][b]> > <cfset z(argumentCollection=q)> > > This works but I'm not accessing the cfc in the application scope which > rather defeats the purpose of writing it into the application scope. > > <cfobject component = "mycfcs.#a#" name = "test"> > > <cfinvoke component = "#test#" > method = "#b#" > returnVariable = "z" > argumentCollection = "#arguments#"> > > Is there a way to access the cfc and method stored in the application scope > and pass in the cfc name and method dynamically? > > Andrew > > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287956 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4