Have you ever been to a site and gotten a pop-up box telling you about a
JavaScript error on the page? It can be really annoying.
What's worse is that the person responsible for maintaining the site doesn't
even know that the error occurred.
This article isn't about ColdFusion error handling. That was covered in 2000
and 2001 in CFDJ by Charlie Arehart's four-part series, "Toward Better Error
Handling," as well as by others. Rather, this article will tell you some ways
to trap JavaScript errors on the client. More important, it'll tell you how
to communicate these errors to ColdF... (more)
Everyone knows that you should reuse your code so that you don't have to
repeatedly write the same functionality. You put widgets in custom tags and
encapsulate logic in CFCs. Even so, your application's user interface may
frequently end up changing. Sometimes the changes are so substantial that it
hardly seems worth the effort to try to reuse code at all. Your efforts to
reuse code and separate business logic from presentation aren't worthwhile
unless you can write your presentation code so that it will be easy to change
to fit changes to your clients' needs or other business re... (more)
Using argumentCollection with Super
I recently had the need to use argumentcollection with super. Unfortunately,
super can't be used with argumentCollection or with named arguments (which
would allow me to loop through a structure and set arguments with
cfinvokeargument).
Fortunately, I found a solution in the comments of the ColdFusion LiveDocs.
As pointed out by "eblackey" (on "Using inheritance and the Super keyword"),
if you copy super to this.super, you can then reference methods of this.super
using argumentCollection or named arguments.
Adding this line to the pseudo-construc... (more)
Back when I had some free time, I started working on my own code generator,
partly because other code generators create code slightly different from my
preferences and partly for the challenge.
I have since gotten too busy to finish it, but I went ahead and finished the
kernel component of the system - the one that actually generates the code. To
download the component go to www.bryantwebconsulting.com/cfcs.
One advantage of ColdFusion being a tag-based language is that generating
code for ColdFusion largely means writing tags.
The best way that I can think to show how tag.cfc wor... (more)