Something to save

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

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

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.

"> Mysterious cfsavecontent

Mysterious cfsavecontent

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 , well at least I think it is a small one but maybe an oversight in the cfml parser.

Anyway the old code had this

<cfsavecontent variable="myStruct.property">
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.

<cfsavecontent variable="myStruct[ArrayCount].property">
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.

<cfsavecontent variable="temp">
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.