Why not just call the method like this:

<cfinvoke component="#instance#" 
        method="#cfcMethodNameIWant#" 
        argumentcollection="#whateverArgs#"/>

Wouldn't this give you the same result?

Paul Kenney
[EMAIL PROTECTED]
916-212-4359 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Nathan Dintenfass
> Sent: Friday, May 14, 2004 8:18 PM
> To: [EMAIL PROTECTED]
> Subject: [CFCDev] Dynamic calling of CFC methods: opinions?
> 
> 
> I find that I occasionally end up wanting to dynamically 
> decide which method
> of a CFC to call.  It ends up looking something like:
> 
> cfcInstance.tempMethodName = cfcInstance[cfcMethodNameIWant];
> cfcInstance.tempMethodName(whateverArgs);
> structDelete(cfcInstance,"tempMethodName");
> 
> It always feels like a gigantic hack when I do it, but it 
> sure has come in
> handy in a couple places.  In a perfect world, I guess I'd 
> build some kind
> of facades with template methods that are known in advance, 
> but that's not
> always practical.
> 
> Any opinions on this practice?  Is it a "bad thing"?
> 
> Thanks,
> 
>  - Nathan
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at 
> www.mail-archive.com/[EMAIL PROTECTED]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to