Mysterious cfsavecontent
Tags: Coldfusion
I have to say that since the introduction of this tag, it has saved me a lot of work in the past.
Today while converting some code into a new framework, I discovered a small hiccup with
Anyway the old code had this
Something to save
</cfsavecontent>
Now this was being used about 13 times in my framework, without a problem. When the requirements for the new framework changed, I had discovered that I needed to make the section of coder that this fell in an associate array.
So low and behold I ended up with this code.
Something to save
</cfsavecontent>
Now, seeing as it is a variable, that coldfusion should know it appears that in this case it is not to be. So the only work around that I found was this.
Something to save
</cfsavecontent>
<cfset myStruct[ArrayCount]/property = temp />
Seems silly that it is not able to see that as a CF variable, but hey oversights in the CFML parser has produced some nifty bugs in the past, so this is maybe no acception to that.
There are no comments for this entry.



TweetBacks