I've already got the object instantiated to the App scope though. <!----------------//------ andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --------------//--------->
-----Original Message----- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 11:20 AM To: CF-Talk Subject: Re: Dynamically calling methods in a CFC <cfinvoke object="#application.imgobject#" method="#scaleMethod#" ... cheers, barneyb On 9/14/06, Andy Matthews <[EMAIL PROTECTED]> wrote: > I'm using Rick Root's image.cfc which contains scaleX and scaleY methods. > > Right now I'm doing an if statement with two lines for the call to the CFC. > > <cfif scaleMethod IS "scaleX"> > <cfset a = APPLICATION.imgObj.scaleX()> > <cfelse> > <cfset a = APPLICATION.imgObj.scaleY()> > </cfif> > > But I'd like to condense it to this: > <cfset a = APPLICATION.imgObj[scaleMethod]()> > > But that method errors. I've tried these as well: > > <cfset a = APPLICATION.imgObj["#scaleMethod#"]()> > <cfset a = APPLICATION.imgObj."#scaleMethod#"()> > <cfset a = APPLICATION.imgObj.#scaleMethod#()> > > But they also failed. I know it's got to be possible, but I'm not sure how > to do it...anyone? > > <!----------------//------ > andy matthews > web developer > certified advanced coldfusion programmer > ICGLink, Inc. > [EMAIL PROTECTED] > 615.370.1530 x737 > --------------//---------> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253131 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

