> <cfset getter = "FirstName">
> <cfset myFN = myObject['get' & getter]() /> ---Throws error
>
> Other try:
> <cfset myFN = myObject['get' & getter & '()'] /> ---Also errors

It's just a shoot in the dark, but, in my experience, if you want to
dinamically define the method's name <cfinvoke> gives you more
flexibility, since you only have to pass a variable or CFML expression to
the method attribute.

The same it's true for whenever you want to dynamically generate the
arguments.

Don't get me wrong, I prefer dot notation myself (I find it easier to
read), but <cfinvoke> is handy on certain cases.

Massimo

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238008
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to