not what you're going for exactly...but could you just have a method called 'scale()' and pass it an argument (X or Y)...the scale() method could then call the scaleX() or scaleY() method as required.
it's not the single line you were looking for...but at least the logic would be in the CFC instead of the calling page. 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:253130 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

