Andy, Try using this:
<cfset a = APPLICATION.imgObj[scaleMethod]/> Then: <cfset a(yourArgs) /> If you notice the methods live in the this and variables scopes in the CFC along with any other variables. Becuase of that, you can treat the method as a key in the scope struct and create a reference copy to the "a" variable. HTH, Jeff >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:253148 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

