Warning: Think before using a xml
Like most of the developers, I use a / on all my HTML tags and also on my CFML tags.. at lease most of them. This morning I called a custom tag that was installed at a client's server, where I work at the moment and the application grinded to a halt... what was the case?
I called the custom tag like this.
<cf_answer name="something" returnvar="qGet" />
Nothing wrong with it, except that i'm used to having a start and end processing in my custom tags.
<cfswitch expression="#ThisTag.ExecutionMode#">
<cfcase value="Start">
<!--- Do things at the start --->
</cfcase>
<cfcase value="End">
<!--- Do things at the end, mostly nothing --->
</cfcase>
</cfswitch>
You probably can guess what was wrong with the application this morning and yes you're right.. the custom tag didn't have this mechanism, where you can skip the end processing of the custom tag. The / at the end told ColdFusion to process the tag again... (I knew this... but didn't think about it)
Before you go rolling on the ground laughing... it's just a reminder to all (like me) that are used to there own method of programming, to sometimes think back to why you program the way you do....
4129 viewed | 1 opinion(s) | del.icio.us | Digg it | Tjarko @ 27/06/05 14:43 cet



