In this scenario, you need to use cfinvoke to do the job for you.
Thanks everyone for your replies.
Andrew.
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
Maybe you could add a delegate method to the CFC that takes an argument
used in a switch statement to determine which method to use. You could also
add error handling here, making your code more robust.
On Feb 11, 2008 10:58 AM, Andrew Grosset [EMAIL PROTECTED] wrote:
In this scenario, you
In this scenario, you need to use cfinvoke to do the job for you.
Thanks everyone for your replies, and yes I'm using cfinvoke, I just hoped
there would be a way to dynamically pass in the method name when using a CFC in
the application scope - seems like there isn't a way! frustrating to say
I have a cfc in the application scope initiated on application start
cfset application.myImage = createObject(component,mycfcs.ImageStuff)
I can then access the methods/functions like so:
(Z returns a boolean indicating weather the image was successfully rotated)
cfset z =
: goldengrove
Web Developer / ColdFusion Programmer
http://William.Seiter.com
-Original Message-
From: Andrew Grosset [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 10, 2008 9:48 AM
To: CF-Talk
Subject: Passing method/function name to CFC
I have a cfc in the application scope initiated
The problem is I cannot find a way to pass in the function name...
something like this..which does not work:
cfset z = application[myname].[mymethod](argumentCollection =
#arguments#)
Yeah, you can't use array notation on the name of a method, so even if
you remove the extra dot between
In this scenario, you need to use cfinvoke to do the job for you.
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
I have a cfc in the application scope initiated on application start
cfset application.myImage = createObject(component,mycfcs.ImageStuff)
I can then access the methods/functions like so:
(Z returns a boolean indicating weather the image was successfully rotated)
cfset z =
8 matches
Mail list logo