I believe the answer is 'yes, the object would be reinstantiated on  
each method request'. I think there might be an exception to that rule  
if it happens within a single http request, but I am not certain.

As I stated before, I do not use cfinvoke. I would therefore opt to go  
with the script example I posted. :-)

Sent from my iPhone

On May 26, 2010, at 12:55, Brad Haas <beh...@gmail.com> wrote:

>
> But isn't it a problem to use CFINVOKE with getters and setters?   
> Wouldn't the object be reinstantiated for every single method call?   
> Am I wrong in assuming this?
>
> --Brad
>
>> **untested**
>>
>> <cfif theField IS NOT "submit">
>>   <cfset theMethod = theObject["set" & theField] />
>>   <cfset theMethod(theField) />
>> </cfif>
>>
>> I don't use cfinvoke, so I may have the syntax a bit wrong...
>>
>> <cfinvoke component="#theObject#" method="set#theField#">
>>   <cfinvokeargument name="#theField#" value="#theField#" />
>> </cfinvoke>
>>
>> HTH
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334008
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to