I'm wondering if this should be reported as a bug.  Basically cfsavecontent
works in unexpected ways.  For example, lets say we have a component that
has a method called test, which returns a string. 

 

<cffunction name="test" returntype="string">

  <cfset var str=""> 

  <cfsavecontent variable="str">

    test

  </cfsavecontent>

 <cfreturn str>

</cffunction>

 

The following 2 code listings do completely different things even though it
wouldn't look like it from the first glance.  Please note that I haven't
tested this code, so it might not compile, but you should get the gyst of
it.  Code listing 1 would output "test", while code listing 2 would output
an empty string.  To me, that doesn't work as expected.  Should this be
considered a bug and possibly fixed in future versions of CF, or is it just
me?

 

Code listing 1

<cfoutput> 

<cfinvoke component "test" method="test"  returnVariable="myStr">

#mystr#

</cfoutput>

 

Code listing 2

<cfinvoke component "test" method="test"  returnVariable="myStr">

<cfoutput> 

#mystr#

</cfoutput>

 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230024
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to